From 5f37fc132a8f41994f37b6712feb2d4fd34c2be0 Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Wed, 3 Aug 2011 19:57:46 -0400 Subject: further debloat cancellation handlers cleanup push and pop are also no-ops if pthread_exit is not reachable. this can make a big difference for library code which needs to protect itself against cancellation, but which is unlikely to actually be used in programs with threads/cancellation. --- src/thread/i386/cancellation.s | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 src/thread/i386/cancellation.s (limited to 'src/thread/i386/cancellation.s') diff --git a/src/thread/i386/cancellation.s b/src/thread/i386/cancellation.s new file mode 100644 index 00000000..75dc6091 --- /dev/null +++ b/src/thread/i386/cancellation.s @@ -0,0 +1,34 @@ +.text +.global __pthread_register_cancel +.type __pthread_register_cancel,@function +__pthread_register_cancel: + pushl %eax + call __pthread_do_register + popl %eax + ret + +.global __pthread_unregister_cancel +.type __pthread_unregister_cancel,@function +__pthread_unregister_cancel: + pushl %eax + call __pthread_do_unregister + popl %eax + ret + +.global __pthread_unwind_next +.type __pthread_unwind_next,@function +__pthread_unwind_next: + pushl %eax + call __pthread_do_unwind + popl %eax +__pthread_do_unwind: +__pthread_do_register: +__pthread_do_unregister: + ret + +.weak __pthread_do_unwind +.weak __pthread_do_register +.weak __pthread_do_unregister +.type __pthread_do_unwind,@function +.type __pthread_do_register,@function +.type __pthread_do_unregister,@function -- cgit v1.2.1