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/include/rtems/posix/threadsup.h

    r8abf006 r927a0a1  
    8181  /** This indicates if a cancelation has been requested. */
    8282  int                     cancelation_requested;
     83#ifndef HAVE_STRUCT__PTHREAD_CLEANUP_CONTEXT
    8384  /** This is the set of cancelation handlers. */
    8485  Chain_Control           Cancellation_Handlers;
     86#else /* HAVE_STRUCT__PTHREAD_CLEANUP_CONTEXT */
     87  /**
     88   * @brief LIFO list of cleanup contexts.
     89   */
     90  struct _pthread_cleanup_context *last_cleanup_context;
     91#endif /* HAVE_STRUCT__PTHREAD_CLEANUP_CONTEXT */
    8592
    8693  /**
Note: See TracChangeset for help on using the changeset viewer.