Changeset 9998 for release/1.2/source


Ignore:
Timestamp:
Jul 10, 2008, 10:29:37 AM (11 years ago)
Author:
gb
Message:

Propagate r9997 to 1.2 branch. Someone else gets the honor of
committing the last 4-digit revision.

File:
1 edited

Legend:

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

    r9852 r9998  
    6161raise_thread_interrupt(TCR *target)
    6262{
     63  pthread_t thread = (pthread_t)target->osid;
    6364#ifdef DARWIN_not_yet
    6465  if (use_mach_exception_handling) {
     
    6667  }
    6768#endif
    68  return pthread_kill((pthread_t)target->osid, SIGNAL_FOR_PROCESS_INTERRUPT);
     69  if (thread != (pthread_t) 0) {
     70    return pthread_kill(thread, SIGNAL_FOR_PROCESS_INTERRUPT);
     71  }
     72  return ESRCH;
    6973}
    7074#endif
     
    180184lock_recursive_lock(RECURSIVE_LOCK m, TCR *tcr)
    181185{
    182   natural val;
    183186  if (tcr == NULL) {
    184187    tcr = get_tcr(true);
     
    232235unlock_recursive_lock(RECURSIVE_LOCK m, TCR *tcr)
    233236{
    234   int ret = EPERM, pending;
     237  int ret = EPERM;
    235238
    236239   if (tcr == NULL) {
     
    11081111{
    11091112  thread_activation activation;
    1110   TCR *current = get_tcr(false);
    11111113
    11121114
     
    12791281{
    12801282  int suspend_count = atomic_incf(&(tcr->suspend_count));
     1283  pthread_t thread;
    12811284  if (suspend_count == 1) {
    12821285#if SUSPEND_RESUME_VERBOSE
     
    12891292    }
    12901293#endif
    1291     if (pthread_kill((pthread_t)(tcr->osid), thread_suspend_signal) == 0) {
     1294    thread = (pthread_t)(tcr->osid);
     1295    if ((thread != (pthread_t) 0) &&
     1296        (pthread_kill(thread, thread_suspend_signal) == 0)) {
    12921297      SET_TCR_FLAG(tcr,TCR_FLAG_BIT_SUSPEND_ACK_PENDING);
    12931298    } else {
     
    13571362resume_tcr(TCR *tcr)
    13581363{
    1359   int suspend_count = atomic_decf(&(tcr->suspend_count)), err;
     1364  int suspend_count = atomic_decf(&(tcr->suspend_count));
    13601365  if (suspend_count == 0) {
    13611366#ifdef DARWIN
     
    15741579
    15751580  void *p = calloc(1,sizeof(rwlock)+cache_block_size-1);
    1576   rwlock *rw;
     1581  rwlock *rw = NULL;;
    15771582 
    15781583  if (p) {
Note: See TracChangeset for help on using the changeset viewer.