[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#642112: [PATCH] timers for kFreeBSD

El 30 de març de 2012 9:11, Petr Salinger <Petr.Salinger@seznam.cz> ha escrit:
>> /* Signal needed for the kernel-supported POSIX timer implementation.
>>  We can reuse the cancellation signal since we can distinguish
>>  cancellation from timer expirations.  */
>> #define SIGTIMER        SIGCANCEL
> Are you sure that the comment hold even for linuxthreads ?

Somewhat.  My latest patch (after fixing other problems [1]) now
passes tst-timer [2], but only *sometimes* (looks like a race).  I
isolated my code into a standalone app by renaming the timer_*
functions and found that when run outside libc it nearly always (or
always? can't recall) works, and when run as part of libc it nearly
always fails, but sometimes works.

See attachment.

[1] Among these, the test itself relied on undefined behaviour by
calling timer_delete(-1). My current patch just replaces it with the
newer version of the same test in nptl/sysdeps/pthread/tst-timer.c
(which is a generic pthread test and doesn't depend on NPTL).

[2] Tested on kfreebsd-10 / i386 only.

Robert Millan

Attachment: timer.diff
Description: Binary data

Reply to: