rwlock->rw_spinlock = 0;
__pthread_init_lock(&rwlock->rw_lock);
pthread_rwlock_init (pthread_rwlock_t *rwlock,		     const pthread_rwlockattr_t *attr){  rwlock->rw_spinlock = 0;  rwlock->rw_readers = 0;  rwlock->rw_writer = NULL;  queue_init(&rwlock->rw_read_waiting);  queue_init(&rwlock->rw_write_waiting);  if (attr == NULL)    {      rwlock->rw_kind = PTHREAD_RWLOCK_DEFAULT_NP;      rwlock->rw_pshared = PTHREAD_PROCESS_PRIVATE;    }  else    {      rwlock->rw_kind = attr->lockkind;      rwlock->rw_pshared = attr->pshared;    }  return 0;}