#include <errno.h>
#include "pthreadP.h"
#include <lowlevellock.h>
+#include <elide.h>
int
{
int result = EBUSY;
+ if (ELIDE_TRYLOCK (rwlock->__data.__rwelision,
+ rwlock->__data.__lock == 0
+ && rwlock->__data.__nr_readers == 0
+ && rwlock->__data.__writer, 1))
+ return 0;
+
lll_lock (rwlock->__data.__lock, rwlock->__data.__shared);
if (rwlock->__data.__writer == 0 && rwlock->__data.__nr_readers == 0)