summaryrefslogtreecommitdiff
path: root/sysdeps/generic/bits/cancelation.h
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/generic/bits/cancelation.h')
-rw-r--r--sysdeps/generic/bits/cancelation.h15
1 files changed, 6 insertions, 9 deletions
diff --git a/sysdeps/generic/bits/cancelation.h b/sysdeps/generic/bits/cancelation.h
index bb6b58a1..46486f5e 100644
--- a/sysdeps/generic/bits/cancelation.h
+++ b/sysdeps/generic/bits/cancelation.h
@@ -1,5 +1,5 @@
/* Cancelation. Generic version.
- Copyright (C) 2002 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2008 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -20,8 +20,6 @@
#ifndef _BITS_CANCELATION_H
#define _BITS_CANCELATION_H 1
-#include <assert.h>
-
struct __pthread_cancelation_handler
{
void (*handler)(void *);
@@ -32,22 +30,21 @@ struct __pthread_cancelation_handler
/* Returns the thread local location of the cleanup handler stack. */
struct __pthread_cancelation_handler **__pthread_get_cleanup_stack (void);
-#define pthread_cleanup_push(rt, rtarg) \
+#define __pthread_cleanup_push(rt, rtarg) \
{ \
struct __pthread_cancelation_handler **__handlers \
= __pthread_get_cleanup_stack (); \
struct __pthread_cancelation_handler __handler = \
{ \
- handler: (rt), \
- arg: (rtarg), \
- next: *__handlers \
+ (rt), \
+ (rtarg), \
+ *__handlers \
}; \
*__handlers = &__handler;
-#define pthread_cleanup_pop(execute) \
+#define __pthread_cleanup_pop(execute) \
if (execute) \
__handler.handler (__handler.arg); \
- assert (*__handlers == &__handler); \
*__handlers = __handler.next; \
}