iOS/libraries/allegro/allegro/src/ios/ithreads.c
/* _ios_create_mutex:
 *  Creates a mutex and returns a pointer to it.
 */
Creates a mutex and returns a pointer to it.
Creates a mutex and returns a pointer to it .
void *_ios_create_mutex(void)
{
   struct my_mutex *mx;
   mx = _AL_MALLOC(sizeof(struct my_mutex));
   if (!mx) {
      *allegro_errno = ENOMEM;
      return NULL;
   }
   mx->lock_count = 0;
   mx->owner = (pthread_t) 0;
   pthread_mutex_init(&mx->actual_mutex, NULL);
   return (void *)mx;
}
void * _ios_create_mutex ( void ) { struct my_mutex * mx ; mx = _AL_MALLOC ( sizeof ( struct my_mutex ) ) ; if ( ! mx ) { * allegro_errno = ENOMEM ; return NULL ; } mx -> lock_count = 0 ; mx -> owner = ( pthread_t ) 0 ; pthread_mutex_init ( & mx -> actual_mutex , NULL ) ; return ( void * ) mx ; }
_ios_create_mutex:
  Creates a mutex and returns a pointer to it.
_ios_create_mutex : Creates a mutex and returns a pointer to it .