This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

sigcancel_handler and coverage of test cases


It would be convenient if sigcancel_handler() kept a count
of the number of times it was invoked, and provided a subroutine
to return the current value of the counter.  This would be a
fast, inexpensive, and independent check to aid in the engineering
of correctness, test coverage, and performance of code which uses
NPTL pthreads.  For example, if execution of a test suite for
code which uses pthread_cond_wait() never encounters sigcancel,
then that may be an indication that the tests are incomplete.
The Linux application supervisor "strace -f" can be used to detect
SIGRTMIN, but strace often distorts the scheduling of threads
in ways that can affect cancellation of futex operations.
The explicit use of pthread_cleanup_push() is related but
requires advance planning, and such a handler is invoked also
by direct (non-async) cancellation.

-- 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]