diff options
Diffstat (limited to 'mdk-stage1/dietlibc/libpthread/pthread_mutex_destroy.c')
-rw-r--r-- | mdk-stage1/dietlibc/libpthread/pthread_mutex_destroy.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/mdk-stage1/dietlibc/libpthread/pthread_mutex_destroy.c b/mdk-stage1/dietlibc/libpthread/pthread_mutex_destroy.c new file mode 100644 index 000000000..33a16abd4 --- /dev/null +++ b/mdk-stage1/dietlibc/libpthread/pthread_mutex_destroy.c @@ -0,0 +1,16 @@ +#include <unistd.h> +#include <errno.h> + +#include <pthread.h> +#include "thread_internal.h" + +int pthread_mutex_destroy(pthread_mutex_t *mutex) +{ + __THREAD_INIT(); + + if ((mutex->owner)||(mutex->lock.__spinlock)) { + (*(__errno_location()))=EBUSY; + return -1; + } + return 0; +} |