Changeset 15333


Ignore:
Timestamp:
Apr 18, 2012, 10:02:36 PM (7 years ago)
Author:
gb
Message:

Terminate the application via fatal_oserr() if a Mach semaphore
can't be created.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/lisp-kernel/thread_manager.c

    r15289 r15333  
    682682#endif
    683683#ifdef USE_MACH_SEMAPHORES
     684  kern_return_t kret;
    684685  semaphore_t s = (semaphore_t)0;
    685   semaphore_create(mach_task_self(),&s, SYNC_POLICY_FIFO, count);
     686  kret = semaphore_create(mach_task_self(),&s, SYNC_POLICY_FIFO, count);
     687  if (kret != KERN_SUCCESS) {
     688    fatal_oserr("Can't create Mach semaphore.",(OSErr)kret);
     689  }
    686690  return (void *)(natural)s;
    687691#endif
Note: See TracChangeset for help on using the changeset viewer.