/* printf.cpp */ // Paula Keezer added a thread safe printf called mprintf // Here is where the mutex is made global and the semaphore is initialized #include "mprintf.h" xSemaphoreHandle pMutex; void mprintf_init () { pMutex = xSemaphoreCreateMutex(); if( pMutex != NULL ) { // The semaphore was created successfully. printf("could create pMutex semaphore\n"); // The semaphore can now be used. } }