Changeset 15577


Ignore:
Timestamp:
Jan 12, 2013, 12:33:56 AM (6 years ago)
Author:
gb
Message:

In shutdown_thread_tcr(), when HAVE_TLS is defined and the tcr is
current_tcr, set current_tcr to NULL and zero out the tcr's contents,
just in case.

This enables destructors established with pthread_key_create to make
callbacks on a newly-initialized TCR and seems to fix ticket:1052 in
the trunk.

File:
1 edited

Legend:

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

    r15539 r15577  
    14211421#endif
    14221422    UNLOCK(lisp_global(TCR_AREA_LOCK),current);
     1423#ifdef HAVE_TLS
     1424    if (current_tcr == tcr) {
     1425      current_tcr = NULL;
     1426      memset(tcr,0,sizeof(tcr));
     1427    }
     1428#endif
    14231429  } else {
    14241430    tsd_set(lisp_global(TCR_KEY), TCR_TO_TSD(tcr));
Note: See TracChangeset for help on using the changeset viewer.