Return to pthread_rwlock_rdlock.c CVS log | Up to [DVB] / dietlibc / libpthread |
add really crappy pthread_rwclock implementation for openssl 1.1
#include <sched.h> #include <pthread.h> int pthread_rwlock_rdlock(pthread_rwlock_t *rwlock) { unsigned int n; for (n=0;;) { int r=pthread_rwlock_tryrdlock(rwlock); if (r==0) return r; if (n<100) { ++n; continue; } sched_yield(); } }