PTHREAD_CLEANUP_PUSH_DEFER_NP(3)
Hello,
I think there is an error in the description
is equivalent to (but shorter and more efficient than):
int oldtype;
pthread_cleanup_push(routine, arg);
pthread_setcanceltype(PTHREAD_CANCEL_DEFERRED, &oldtype);
...
pthread_setcanceltype(oldtype, NULL);
pthread_cleanup_pop(execute);this should be instead
is equivalent to (but shorter and more efficient than):
int oldtype;
pthread_setcanceltype(PTHREAD_CANCEL_DEFERRED, &oldtype);
pthread_cleanup_push(routine, arg);
...
pthread_cleanup_pop(execute);
pthread_setcanceltype(oldtype, NULL);Signature · 13 lines
Sebastian Huber, embedded brains GmbH Address : Dornierstr. 4, D-82178 Puchheim, Germany Phone : +49 89 189 47 41-16 Fax : +49 89 189 47 41-09 E-Mail : sebastian.huber-L1vi/[email protected] PGP : Public key available on request. Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG. -- To unsubscribe from this list: send the line "unsubscribe linux-man" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): 51D588FC.6070701-L1vi/[email protected]
Sebastian,
Quoted 16 lines · Sebastian Huber
Hello,
I think there is an error in the description
is equivalent to (but shorter and more efficient than): int oldtype; pthread_cleanup_push(routine, arg); pthread_setcanceltype(PTHREAD_CANCEL_DEFERRED, &oldtype); ... pthread_setcanceltype(oldtype, NULL); pthread_cleanup_pop(execute);this should be instead
Quoted 9 lines
is equivalent to (but shorter and more efficient than):
int oldtype;
pthread_setcanceltype(PTHREAD_CANCEL_DEFERRED, &oldtype);
pthread_cleanup_push(routine, arg);
...
pthread_cleanup_pop(execute);
pthread_setcanceltype(oldtype, NULL);I am doubtful of this, but, can you provide some evidence to support your claim?
Thanks,
Michael
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): CAKgNAkimJbCdJ6W_+1qaM1KpCxFAN5EfzbMF_PDBC7vcXcb6dA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org
Hello Michael,
Quoted 24 lines · Michael Kerrisk (man-pages)
Sebastian,
Quoted 20 lines · Sebastian Huber
Hello,
I think there is an error in the description
is equivalent to (but shorter and more efficient than): int oldtype; pthread_cleanup_push(routine, arg); pthread_setcanceltype(PTHREAD_CANCEL_DEFERRED, &oldtype); ... pthread_setcanceltype(oldtype, NULL); pthread_cleanup_pop(execute);this should be instead
is equivalent to (but shorter and more efficient than):
int oldtype;
Quoted 8 lines
Quoted 5 lines
pthread_setcanceltype(PTHREAD_CANCEL_DEFERRED, &oldtype); pthread_cleanup_push(routine, arg); ... pthread_cleanup_pop(execute); pthread_setcanceltype(oldtype, NULL);I am doubtful of this, but, can you provide some evidence to support your claim?
ok, I looked at the pthread.h of glibc and this seems to be not a man page problem, but a glibc bug/feature.
I thought that the pthread_cleanup_push_defer() solves the problem highlighted in this example:
http://www.sourceware.org/pthreads-win32/manual/pthread_cleanup_push.html
I will address this on a glibc list. Sorry for the noise.
Signature · 13 lines
Sebastian Huber, embedded brains GmbH Address : Dornierstr. 4, D-82178 Puchheim, Germany Phone : +49 89 189 47 41-16 Fax : +49 89 189 47 41-09 E-Mail : sebastian.huber-L1vi/[email protected] PGP : Public key available on request. Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG. -- To unsubscribe from this list: send the line "unsubscribe linux-man" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html