musl/src/thread/cancellation.c, branch master musl - an implementation of the standard library for Linux-based systems rename file containing pthread_cleanup_push and pop for consistency 2014年07月07日T03:10:35+00:00 Rich Felker dalias@aerifal.cx 2014年07月07日T03:10:35+00:00 4b48b00a9019fc108b73a04704c3657a4b29b58f
simplify cancellation push/pop slightly 2012年05月23日T18:13:54+00:00 Rich Felker dalias@aerifal.cx 2012年05月23日T18:13:54+00:00 cfd892fde9454e014d9b291a56ce5740d8bc4a78 no need to pass unnecessary extra arguments on to the core code in pthread_create.c. this just wastes cycles and code bloat.
no need to pass unnecessary extra arguments on to the core code in
pthread_create.c. this just wastes cycles and code bloat.
fix pthread_cleanup_pop(1) crash in non-thread-capable, static-linked programs 2012年02月28日T15:13:35+00:00 Rich Felker dalias@aerifal.cx 2012年02月28日T15:13:35+00:00 e3234d01094d9ed62e90c6d52a44601dce93a1bb
small fix for new pthread cleanup stuff 2012年02月10日T02:24:56+00:00 Rich Felker dalias@aerifal.cx 2012年02月10日T02:24:56+00:00 2230218c283af7fbff08167685f17dad8d748f14 even if pthread_create/exit code is not linked, run flag needs to be checked and cleanup function potentially run on pop. thus, move the code to the module that's always linked when pthread_cleanup_push/pop is used.
even if pthread_create/exit code is not linked, run flag needs to be
checked and cleanup function potentially run on pop. thus, move the
code to the module that's always linked when pthread_cleanup_push/pop
is used.
replace bad cancellation cleanup abi with a sane one 2012年02月09日T07:33:08+00:00 Rich Felker dalias@aerifal.cx 2012年02月09日T07:33:08+00:00 afc35d5efde48b82a7786d9c89b115965da6b637 the old abi was intended to duplicate glibc's abi at the expense of being ugly and slow, but it turns out glib was not even using that abi except on non-gcc-compatible compilers (which it doesn't even support) and was instead using an exceptions-in-c/unwind-based approach whose abi we could not duplicate anyway without nasty dwarf2/unwind integration. the new abi is copied from a very old glibc abi, which seems to still be supported/present in current glibc. it avoids all unwinding, whether by sjlj or exceptions, and merely maintains a linked list of cleanup functions to be called from the context of pthread_exit. i've made some care to ensure that longjmp out of a cleanup function should work, even though it is not required to. this change breaks abi compatibility with programs which were using pthread cancellation, which is unfortunate, but that's why i'm making the change now rather than later. considering that most pthread features have not been usable until recently anyway, i don't see it as a major issue at this point.
the old abi was intended to duplicate glibc's abi at the expense of
being ugly and slow, but it turns out glib was not even using that abi
except on non-gcc-compatible compilers (which it doesn't even support)
and was instead using an exceptions-in-c/unwind-based approach whose
abi we could not duplicate anyway without nasty dwarf2/unwind
integration.
the new abi is copied from a very old glibc abi, which seems to still
be supported/present in current glibc. it avoids all unwinding,
whether by sjlj or exceptions, and merely maintains a linked list of
cleanup functions to be called from the context of pthread_exit. i've
made some care to ensure that longjmp out of a cleanup function should
work, even though it is not required to.
this change breaks abi compatibility with programs which were using
pthread cancellation, which is unfortunate, but that's why i'm making
the change now rather than later. considering that most pthread
features have not been usable until recently anyway, i don't see it as
a major issue at this point.
further debloat cancellation handlers 2011年08月03日T23:57:46+00:00 Rich Felker dalias@aerifal.cx 2011年08月03日T23:57:46+00:00 5f37fc132a8f41994f37b6712feb2d4fd34c2be0 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.
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.
fix static linking dependency bloat with cancellation 2011年08月03日T23:45:21+00:00 Rich Felker dalias@aerifal.cx 2011年08月03日T23:45:21+00:00 730bee725a770b543181424b52203dd1634ab5d1 previously, pthread_cleanup_push/pop were pulling in all of pthread_create due to dependency on the __pthread_unwind_next function. this was not needed, as cancellation cleanup handlers can never be called unless pthread_exit or pthread_cancel is reachable.
previously, pthread_cleanup_push/pop were pulling in all of
pthread_create due to dependency on the __pthread_unwind_next
function. this was not needed, as cancellation cleanup handlers can
never be called unless pthread_exit or pthread_cancel is reachable.
match glibc/lsb cancellation abi on i386 2011年03月26日T02:13:57+00:00 Rich Felker dalias@aerifal.cx 2011年03月26日T02:13:57+00:00 ea343364a719add2cd8adf8a50c15bb5f9400dd8 glibc made the ridiculous choice to use pass-by-register calling convention for these functions, which is impossible to duplicate directly on non-gcc compilers. instead, we use ugly asm to wrap and convert the calling convention. presumably this works with every compiler anyone could potentially want to use.
glibc made the ridiculous choice to use pass-by-register calling
convention for these functions, which is impossible to duplicate
directly on non-gcc compilers. instead, we use ugly asm to wrap and
convert the calling convention. presumably this works with every
compiler anyone could potentially want to use.
reorganize thread exit code, make pthread_exit call cancellation handlers (pt2) 2011年02月14日T00:58:30+00:00 Rich Felker dalias@aerifal.cx 2011年02月14日T00:58:30+00:00 1a9a2ff7b0daf99100db53440a0b18b2801566ca
initial check-in, version 0.5.0 2011年02月12日T05:22:29+00:00 Rich Felker dalias@aerifal.cx 2011年02月12日T05:22:29+00:00 0b44a0315b47dd8eced9f3b7f31580cf14bbfc01

AltStyle によって変換されたページ (->オリジナル) /