int count; acquire(&mutex->m_spinlock); count = mutex->m_count; release(&mutex->m_spinlock); if (count > 0) return EBUSY;
if (mutex->m_lock.status != 0) return EBUSY;
weak_alias (__pthread_mutex_init, pthread_mutex_init)int __pthread_mutex_destroy(pthread_mutex_t * mutex){  int count;  acquire(&mutex->m_spinlock);  count = mutex->m_count;  release(&mutex->m_spinlock);  if (count > 0) return EBUSY;  return 0;}