Changeset 927a0a1 in rtems for cpukit/posix/src/pthread.c


Ignore:
Timestamp:
Dec 2, 2013, 7:33:35 AM (6 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11, master
Children:
aaaedba
Parents:
8abf006
git-author:
Sebastian Huber <sebastian.huber@…> (12/02/13 07:33:35)
git-committer:
Sebastian Huber <sebastian.huber@…> (12/02/13 08:24:51)
Message:

posix: Use cleanup contexts on the stack

Provide support for latest Newlib <pthread.h> change. The cleanup
contexts are stored on the thread stack. This is conformant with the
POSIX requirements for the pthread_cleanup_push() and
pthread_cleanup_pop() statement pair.

Passing an invalid pointer as the routine to pthread_cleanup_push() is
now a usage error and the behaviour is undefined.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpukit/posix/src/pthread.c

    r8abf006 r927a0a1  
    201201  api->cancelability_state = PTHREAD_CANCEL_ENABLE;
    202202  api->cancelability_type = PTHREAD_CANCEL_DEFERRED;
     203#ifndef HAVE_STRUCT__PTHREAD_CLEANUP_CONTEXT
    203204  _Chain_Initialize_empty (&api->Cancellation_Handlers);
     205#else /* HAVE_STRUCT__PTHREAD_CLEANUP_CONTEXT */
     206  api->last_cleanup_context = NULL;
     207#endif /* HAVE_STRUCT__PTHREAD_CLEANUP_CONTEXT */
    204208
    205209  /*
Note: See TracChangeset for help on using the changeset viewer.