- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
does anyone know if you can define multiple mutexs in microC OS 2?
I have more than one shared resource that I would like to have different semaphores for. But I would like to use mutex semaphores. Based on the microC OS 2 book, it seems like you can only make 1 mutex :confused: am i missing something?Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
maybe he has a mistake in his example in chapter 8.1 of his book?
He has a line of code that says OSMutexCreate(9,&err); I think maybe this should read ResourceMutex = OSMutexCreate(9,&err); ??? I guess the question is do you need to create an OS_EVENT* type and set it eqaual to OSMutexCreate() ? It must just be a mistake in the documentation. Can someone confirm?- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
My uC/OS-2 manual reads
DispMutex = OSMutexCreate(20, &err); Based on this i see no reason why there should be not more then 1 Mutex in a System. What you need to do is reserve enough space for the event control blocks in the system lib settings. karsten- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
thank you, yes I believe you are correct.

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page