Pls sanity check my semtimedop(2) implementation

John Baldwin jhb at freebsd.org
Thu Jul 17 14:25:41 UTC 2008


On Saturday 12 July 2008 07:11:26 pm Michael B Allen wrote:
> Hi,
> 
> Below is a semtimedop(2) implementation that I'm using for FreeBSD. I
> was hoping someone could look it over and tell me if they think the
> implementation is sound.
> 
> The code seems to work ok but when stressing the FreeBSD build of my app
> I have managed to provoke errors related to concurrency (usually when a
> SIGALRM goes off). The Linux build works flawlessesly so I'm wondering
> about this one critical function that is different.
> 
> Do you think it would make any difference if I used
> ITIMER_VIRTUAL / SIGVTALRM instead of ITIMER_REAL / SIGALRM?
> 
> Or perhaps I should be using a different implementation entirely?

What specific races are you seeing?  The timer is firing too early, too late?

-- 
John Baldwin


More information about the freebsd-hackers mailing list