| 66 | } |
| 67 | |
| 68 | int init_recursive_mutex(pthread_mutex_t *m) |
| 69 | { |
| 70 | #ifndef NO_PTHREADS |
| 71 | pthread_mutexattr_t a; |
| 72 | int ret; |
| 73 | |
| 74 | ret = pthread_mutexattr_init(&a); |
| 75 | if (!ret) { |
| 76 | ret = pthread_mutexattr_settype(&a, PTHREAD_MUTEX_RECURSIVE); |
| 77 | if (!ret) |
| 78 | ret = pthread_mutex_init(m, &a); |
| 79 | pthread_mutexattr_destroy(&a); |
| 80 | } |
| 81 | return ret; |
| 82 | #else |
| 83 | return 0; |
| 84 | #endif |
| 85 | } |
| 86 | |
| 87 | #ifdef NO_PTHREADS |
| 88 | int dummy_pthread_create(pthread_t *pthread, const void *attr, |
no outgoing calls
no test coverage detected