This patch fixes "../sysdeps/nptl/pthread.h:670:26: warning:
initialization discards 'volatile' qualifier from pointer target type"
arising when building nptl/tst-cancel-self-cancelstate.c. The problem
is passing a volatile int * to a macro expecting void *; the patch
adds an explicit cast.
Tested for x86_64.
* nptl/tst-cancel-self-cancelstate.c (do_test): Cast argument of
pthread_cleanup_push to void *.
There is nothing in the POSIX specification to disallow a
single-threaded program from cancelling itself, so we forcibly enable
multiple_threads to allow the next available cancellation point in the
thread to run.
Also added additional tests to cover various cancellation scenarios.