This is the mail archive of the
libc-ports@sources.redhat.com
mailing list for the libc-ports project.
Re: incorrect usage of cancellable nanosleep() in __pthread_acquire() ?
- From: Atsushi Nemoto <anemo at mba dot ocn dot ne dot jp>
- To: vapier at gentoo dot org
- Cc: libc-ports at sourceware dot org
- Date: Thu, 26 Oct 2006 11:22:45 +0900 (JST)
- Subject: Re: incorrect usage of cancellable nanosleep() in __pthread_acquire() ?
- References: <200610250611.40360.vapier@gentoo.org>
On Wed, 25 Oct 2006 06:11:39 -0400, Mike Frysinger <vapier@gentoo.org> wrote:
> perhaps this would even be too much:
> } else {
> + pthread_descr self = thread_self();
> + int oldstate = THREAD_GETMEM(self, p_cancelstate);
> + THREAD_SETMEM(self, p_cancelstate, PTHREAD_CANCEL_DISABLE);
> tm.tv_sec = 0;
> tm.tv_nsec = SPIN_SLEEP_DURATION;
> nanosleep(&tm, NULL);
> + THREAD_SETMEM(self, p_cancelstate, PTHREAD_CANCEL_ENABLE);
> cnt = 0;
> }
There is a bug report (and a patch) about this issue in Debian BTS:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=342574
---
Atsushi Nemoto