h/t Sebastian Wicki for the bug report.
@ -20,11 +20,13 @@
#include "pthreadP.h"
#ifndef __riscv_atomic
int
pthread_spin_destroy (lock)
pthread_spinlock_t *lock;
pthread_spin_destroy (pthread_spinlock_t *lock)
{
#ifdef __riscv_atomic
/* Nothing to do. */
return 0;
#else
return pthread_mutex_destroy(lock);
}
#endif
@ -21,10 +21,13 @@
pthread_spin_init (pthread_spinlock_t *lock, int pshared)
*lock = 0;
return pthread_mutex_init(lock, NULL);