diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2013-12-02 08:33:35 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2013-12-02 09:24:51 +0100 |
commit | 927a0a1f990c19a3e7295bb001896b3f3c75a77e (patch) | |
tree | b4c1cdb1a406b700a17b80e235613c9ced8c0cd9 /cpukit/posix/include/rtems/posix/cancel.h | |
parent | pstmtests_plan.csv: Update to reflect psxtmcond 09 and 10 exit (diff) | |
download | rtems-927a0a1f990c19a3e7295bb001896b3f3c75a77e.tar.bz2 |
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.
Diffstat (limited to '')
-rw-r--r-- | cpukit/posix/include/rtems/posix/cancel.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/cpukit/posix/include/rtems/posix/cancel.h b/cpukit/posix/include/rtems/posix/cancel.h index c1fff9c04d..7b2ab5ca42 100644 --- a/cpukit/posix/include/rtems/posix/cancel.h +++ b/cpukit/posix/include/rtems/posix/cancel.h @@ -21,6 +21,7 @@ #include <rtems/posix/threadsup.h> +#ifndef HAVE_STRUCT__PTHREAD_CLEANUP_CONTEXT /** * This structure is used to manage the cancelation handlers. */ @@ -32,6 +33,7 @@ typedef struct { /** This field is the argument to the cancelation routine. */ void *arg; } POSIX_Cancel_Handler_control; +#endif /* HAVE_STRUCT__PTHREAD_CLEANUP_CONTEXT */ /** * @brief POSIX run thread cancelation. |