Changeset 6414 for branches/x8664-call


Ignore:
Timestamp:
May 4, 2007, 5:32:40 AM (13 years ago)
Author:
gb
Message:

Fix USE_MACH_EXCEPTION_LOCK conditionalization.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/x8664-call/ccl/lisp-kernel/ppc-exceptions.c

    r6413 r6414  
    22362236#define TCR_TO_EXCEPTION_PORT(tcr) ((mach_port_t)((natural)(tcr)))
    22372237
     2238
    22382239#if USE_MACH_EXCEPTION_LOCK
    22392240pthread_mutex_t _mach_exception_lock, *mach_exception_lock;
     
    26662667#endif
    26672668
    2668   if ((!USE_MACH_EXCEPTION_LOCK) || (pthread_mutex_trylock(mach_exception_lock) == 0)) {
     2669  if (
     2670#if USE_MACH_EXCEPTION_LOCK
     2671    pthread_mutex_trylock(mach_exception_lock) == 0
     2672#else
     2673    1
     2674#endif
     2675    ) {
    26692676    if (tcr->flags & (1<<TCR_FLAG_BIT_PENDING_EXCEPTION)) {
    26702677      CLR_TCR_FLAG(tcr,TCR_FLAG_BIT_PENDING_EXCEPTION);
     
    27242731      }
    27252732    }
     2733#if USE_MACH_EXCEPTION_LOCK
    27262734#ifdef DEBUG_MACH_EXCEPTIONS
    27272735    fprintf(stderr, "releasing Mach exception lock in exception thread\n");
    27282736#endif
    27292737    pthread_mutex_unlock(mach_exception_lock);
     2738#endif
    27302739  } else {
    27312740    SET_TCR_FLAG(tcr,TCR_FLAG_BIT_PENDING_EXCEPTION);
     
    28192828  kern_return_t kret; 
    28202829  if (__exception_port_set == MACH_PORT_NULL) {
     2830#if USE_MACH_EXCEPTION_LOCK
    28212831    mach_exception_lock = &_mach_exception_lock;
    28222832    pthread_mutex_init(mach_exception_lock, NULL);
    2823 
     2833#endif
    28242834    kret = mach_port_allocate(mach_task_self(),
    28252835                              MACH_PORT_RIGHT_PORT_SET,
     
    30963106
    30973107  LOCK(lisp_global(TCR_AREA_LOCK), current);
     3108#if USE_MACH_EXCEPTION_LOCK
    30983109  pthread_mutex_lock(mach_exception_lock);
     3110#endif
    30993111
    31003112  if (suspend_mach_thread(mach_thread)) {
     
    31243136   
    31253137  }
     3138#if USE_MACH_EXCEPTION_LOCK
    31263139  pthread_mutex_unlock(mach_exception_lock);
     3140#endif
    31273141  UNLOCK(lisp_global(TCR_AREA_LOCK), current);
    31283142  return 0;
Note: See TracChangeset for help on using the changeset viewer.