| 237 | #if !defined(ANDROID) && (/*defined(LINUX) ||*/ defined(__HAIKU__) || defined(WIN32)) |
| 238 | |
| 239 | PUBLIC 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 | |
| 253 | PUBLIC int csoundWaitThreadLock(void *lock, size_t milliseconds) |
| 254 | { |
no outgoing calls
no test coverage detected