CW10, MQX3.6, sem_open, semaphore pointer shared between tasks

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

CW10, MQX3.6, sem_open, semaphore pointer shared between tasks

ソリューションへジャンプ
1,867件の閲覧回数
WHookway
Contributor III

Hi,

Assuming the semaphores and threads are going to be used for the life of the program is it necessary to use sem_open for each thread that wishes to use the semaphore?  Can the initialization routine use sem_create followed by a sem_open and then pass the pointer to the semaphore to all those that need it?  Same question for the events.  I do plan on using the SEM_PRIORITY_INHERITANCE.

Thanks,

Will

 

0 件の賞賛
返信
1 解決策
1,312件の閲覧回数
JuroV
NXP Employee
NXP Employee

Thank you for pointing to this. Your change request was accepted and the RM will be changed with next release of MQX.

元の投稿で解決策を見る

0 件の賞賛
返信
2 返答(返信)
1,312件の閲覧回数
WHookway
Contributor III

Hi,

Follow up - actually the sample code for sem_open in the MQX Reference Manual would imply this could be done since sem_handle is being used without a corresponding sem_open, although the sem_handle is never initialized.  This is different from the same code in the users guide.

Thanks,

Will

 

0 件の賞賛
返信
1,313件の閲覧回数
JuroV
NXP Employee
NXP Employee

Thank you for pointing to this. Your change request was accepted and the RM will be changed with next release of MQX.

0 件の賞賛
返信