The semantics of pthread_cond_wait

2012-08-15 Thread Thomas DiModica
My understanding is that pthread_cond_wait is a cancellation point. It achieves this by entering asynchronous cancellation mode before blocking. I don't see, however, any code that checks for a pending cancellation when we enter the function. As far as I can tell, the implementation is that pthrea

Re: Compiling ext2fs.static with pthreads

2012-08-15 Thread Thomas DiModica
>How I got around this was to apply Thomas Schwinge's fix_have_kernel_resources >branch to libpthread. Basically, the first thread structure allocated is not >zeroed out, >so have_kernel_resources is some random non-zero number, and thus the thread >neither gets a wakeup port, nor does the kernel_

Re: Compiling ext2fs.static with pthreads

2012-08-15 Thread Thomas DiModica
- Original Message - From: Richard Braun To: Thomas Thomas Cc: bug-hurd@gnu.org Sent: Wednesday, August 15, 2012 3:24 AM Subject: Re: Compiling ext2fs.static with pthreads >On Tue, May 08, 2012 at 07:16:09PM -0700, Thomas Thomas wrote: >> So, it runs as a translator. Spews out some unexp

Re: Question about your libpthread

2012-08-15 Thread Richard Braun
On Wed, Aug 15, 2012 at 03:03:55PM +0200, Samuel Thibault wrote: > The alignment issue is for threadvars: as long as we have them, we > need the stack to be aligned, and some constant size. Fortunately, > threadvars are to be dropped, but it's still not complete yet. That's also the idea I got fr

Re: Question about your libpthread

2012-08-15 Thread Samuel Thibault
The alignment issue is for threadvars: as long as we have them, we need the stack to be aligned, and some constant size. Fortunately, threadvars are to be dropped, but it's still not complete yet. Samuel

Re: The workings of the pthreads ufs patch

2012-08-15 Thread Richard Braun
On Tue, Aug 14, 2012 at 01:01:03PM -0700, Thomas DiModica wrote: > Richard, if you wish to remove this optimization for the sake of clarity, be > my guest. I was just trying to be faithful to the working of the original > code. I won't remove it for two reasons: first, it looks indeed faithful to

Re: Compiling ext2fs.static with pthreads

2012-08-15 Thread Richard Braun
On Wed, Aug 15, 2012 at 11:24:20AM +0200, Richard Braun wrote: > What prevents _hurdsig_init from being called unconditionally and > earlier ? In the meantime, I merely made sigstate_is_global_rcv check that _hurd_global_sigstate isn't NULL. Now I have a subhurd completely populated by pthreads-en

Re: Compiling ext2fs.static with pthreads

2012-08-15 Thread Richard Braun
On Tue, May 08, 2012 at 07:16:09PM -0700, Thomas Thomas wrote: > So, it runs as a translator. Spews out some unexpected debugging info that > Barry > added, but I can add files, delete files, list directories, etc. I haven't > tested it under > load, however. Thank you for the link on debugging t