This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//***************Lab 7*************/ | |
/*Notes: | |
~Mutex = mutual exclusion | |
~A semaphore that is used for mutual exclusion must always be returned | |
~A mutex is a type of semaphore | |
~To create a mutex type semaphore, use the xSemaphoreCreateMutex() API function. | |
~xSemaphoreTake( xMutex, portMAX_DELAY ); | |
~ The following line will only execute once the mutex has been successfully obtained. | |
~xSemaphoreGive( xMutex ); The mutex MUST be given back! | |
~main() simply creates the mutex, creates the tasks, then starts the scheduler |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//***************Lab 7*************/ | |
/*Notes: | |
~Mutex = mutual exclusion | |
~A semaphore that is used for mutual exclusion must always be returned | |
~A mutex is a type of semaphore | |
~To create a mutex type semaphore, use the xSemaphoreCreateMutex() API function. | |
~xSemaphoreTake( xMutex, portMAX_DELAY ); | |
~ The following line will only execute once the mutex has been successfully obtained. | |
~xSemaphoreGive( xMutex ); The mutex MUST be given back! | |
~main() simply creates the mutex, creates the tasks, then starts the scheduler |