Re: [PATCH glibc-2.44] Fix __pthread_timedblock for hurd

Samuel Thibault <[email protected]>
Newsgroups gmane.os.hurd.bugs
Organization I am not organized
Message-ID <aor21CIYxRgh988Q@end>
Samuel Thibault, le dim. 23 août 2026 15:30:09 +0200, a ecrit:
> Damien Zammit, le dim. 23 août 2026 13:25:28 +0000, a ecrit:
> > On 23/8/26 9:24 pm, Samuel Thibault wrote:
> > > Samuel Thibault, le dim. 23 août 2026 11:16:59 +0200, a ecrit:
> > >> Samuel Thibault, le dim. 23 août 2026 11:11:52 +0200, a ecrit:
> > >>> Samuel Thibault, le dim. 23 août 2026 10:24:52 +0200, a ecrit:
> > >>>> One thing that is a bug, however, is the program below, which stays
> > >>>> blocked because the mach_msg calling loop keeps using the same timeout.
> > >>>>
> > >>>> We probably need a version that takes a clock_id and an absolute time,
> > >>>> and does the clock_gettime call itself on each mach_msg calling loop.
> > >>> Or probably simpler: make __pthread_timedblock always pass
> > >>> MACH_RCV_INTERRUPT to __mach_msg, but loop around if it returns EINTR
> > >>> and MACH_RCV_INTERRUPT was not in MSG_OPTIONS.
> > >> Could you try this?
> > 
> > Currently:
> > 
> > demo@zamhurd64:~$ gcc ptcond.c -o ptcond -lpthread
> > demo@zamhurd64:~$ ./ptcond
> 
> Yes, sure, it works for me too, but what about your java testcase?

(btw, libpthread is empty nowadays, it's all moved to libc)

Samuel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.