about summary refs log tree commit diff
path: root/nptl/pthreadP.h
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2002-12-08 09:41:40 +0000
committerUlrich Drepper <drepper@redhat.com>2002-12-08 09:41:40 +0000
commit1e50662964de0684256118a2775ac05cf80e4f6f (patch)
treed25ba529835db686bff9783d8c9f4cd9c2831d41 /nptl/pthreadP.h
parenta3957dd58406620c6b4541bafb412d68723979c8 (diff)
downloadglibc-1e50662964de0684256118a2775ac05cf80e4f6f.tar.gz
glibc-1e50662964de0684256118a2775ac05cf80e4f6f.tar.xz
glibc-1e50662964de0684256118a2775ac05cf80e4f6f.zip
Update.
	* pthreadP.h: Enable pthread_cleanup_{push,pop} optimizations only
	inside libpthread.
Diffstat (limited to 'nptl/pthreadP.h')
-rw-r--r--nptl/pthreadP.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/nptl/pthreadP.h b/nptl/pthreadP.h
index c90b782722..4fba194108 100644
--- a/nptl/pthreadP.h
+++ b/nptl/pthreadP.h
@@ -190,19 +190,21 @@ extern int __pthread_setcanceltype (int type, int *oldtype);
 extern int __pthread_enable_asynccancel (void) attribute_hidden;
 extern void __pthread_disable_asynccancel (int oldtype) attribute_hidden;
 
+#ifdef IS_IN_libpthread
 /* Special versions which use non-exported functions.  */
 extern void _GI_pthread_cleanup_push (struct _pthread_cleanup_buffer *buffer,
 				      void (*routine) (void *), void *arg)
      attribute_hidden;
-#undef pthread_cleanup_push
-#define pthread_cleanup_push(routine,arg) \
+# undef pthread_cleanup_push
+# define pthread_cleanup_push(routine,arg) \
   { struct _pthread_cleanup_buffer _buffer;				      \
     _GI_pthread_cleanup_push (&_buffer, (routine), (arg));
 
 extern void _GI_pthread_cleanup_pop (struct _pthread_cleanup_buffer *buffer,
 				     int execute) attribute_hidden;
-#undef pthread_cleanup_pop
-#define pthread_cleanup_pop(execute) \
+# undef pthread_cleanup_pop
+# define pthread_cleanup_pop(execute) \
     _GI_pthread_cleanup_pop (&_buffer, (execute)); }
+#endif
 
 #endif	/* pthreadP.h */