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

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

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

跳至解决方案
1,290 次查看
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 解答
735 次查看
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 回复数
735 次查看
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 项奖励
回复
736 次查看
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 项奖励
回复