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

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

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

Jump to solution
1,289 Views
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 Kudos
Reply
1 Solution
734 Views
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.

View solution in original post

0 Kudos
Reply
2 Replies
734 Views
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 Kudos
Reply
735 Views
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 Kudos
Reply