acquire (&rwlock->rw_spinlock);
__pthread_lock (&rwlock->rw_lock);
pthread_rwlock_wrlock (pthread_rwlock_t *rwlock){  pthread_descr self = thread_self ();  while(1)    {      acquire (&rwlock->rw_spinlock);      if (rwlock->rw_readers == 0 && rwlock->rw_writer == NULL)	{	  rwlock->rw_writer = self;	  release (&rwlock->rw_spinlock);	  return 0;	}      /* Suspend ourselves, then try again */      enqueue (&rwlock->rw_write_waiting, self);      release (&rwlock->rw_spinlock);      suspend (self); /* This is not a cancellation point */    }}