In this example three threads are competing for two resources. The number of free resources is managed in a semaphore while the indiviual resource accesses are protected by 1-1 mutex. The RGB LED shows the waitings state of tasks accessing no resource.

Dependencies:   mbed-rtos mbed

Download repository: zip gz

Files at revision 0:15e98ba559c1

Name Size Actions
main.cpp 2426 Revisions Annotate
mbed-rtos.lib 65 Revisions Annotate
mbed.bld 65 Revisions Annotate