MCPcopy Create free account
hub / github.com/csound/csound / csoundCreateThreadLock

Function csoundCreateThreadLock

Top/threads.c:239–251  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

237#if !defined(ANDROID) && (/*defined(LINUX) ||*/ defined(__HAIKU__) || defined(WIN32))
238
239PUBLIC void *csoundCreateThreadLock(void)
240{
241 pthread_mutex_t *pthread_mutex;
242
243 pthread_mutex = (pthread_mutex_t*) malloc(sizeof(pthread_mutex_t));
244 if (pthread_mutex == NULL)
245 return NULL;
246 if (pthread_mutex_init(pthread_mutex, NULL) != 0) {
247 free(pthread_mutex);
248 return NULL;
249 }
250 return (void*) pthread_mutex;
251}
252
253PUBLIC int csoundWaitThreadLock(void *lock, size_t milliseconds)
254{

Callers 4

CsoundThreadLockMethod · 0.85
CsoundThreadLockMethod · 0.85
CsoundThreadLockMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected