Keil Logo

CMSIS-RTOS2 Using mutex

Next Thread | Thread List | Previous Thread Start a Thread | Settings

Details Message
Author
Antonio Portaluri
Posted
11-Feb-2019 11:21 GMT
Toolset
None
New! CMSIS-RTOS2 Using mutex

Hi,
I'm new with the CMSIS-RTOS2. I want to test the Mutexes, so I read the online documentation and I create the Mutex.c template file from Keil.

I see from the template file that the mutex is placed inside a thread, so I have some questions:

1. A mutex must belongs to a dedicated thread?
2. What if I create 1, 2 or 3 mutexes in my main thread and use them (for peripheral access, for example)?
3. The Mutex.c file has a bug at line 16 while check the mutex creation failure?

From Mutex.c file:

15  mid_Thread_Mutex = osMutexNew (NULL);
16  if (!tid_Thread_Mutex) {

Thanks in advance,
Antonio

Next Thread | Thread List | Previous Thread Start a Thread | Settings

  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.