MCPcopy Create free account
hub / github.com/cpputest/cpputest / PThreadMutexCreate

Function PThreadMutexCreate

src/Platforms/Gcc/UtestPlatform.cpp:301–312  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

299int (*PlatformSpecificAtExit)(void(*func)(void)) = atexit; /// this was undefined before
300
301static PlatformSpecificMutex PThreadMutexCreate(void)
302{
303#ifdef CPPUTEST_HAVE_PTHREAD_MUTEX_LOCK
304 pthread_mutex_t *mutex = new pthread_mutex_t;
305
306 pthread_mutex_init(mutex, NULLPTR);
307 return (PlatformSpecificMutex)mutex;
308#else
309 return NULLPTR;
310#endif
311
312}
313
314#ifdef CPPUTEST_HAVE_PTHREAD_MUTEX_LOCK
315static void PThreadMutexLock(PlatformSpecificMutex mtx)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected