Unix Programming - For SGI and Linux: Instr like Semaphore with a Setable Timeout

This is Interesting: Free IT Magazines  
Home > Archive > Unix Programming > July 2005 > For SGI and Linux: Instr like Semaphore with a Setable Timeout





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author For SGI and Linux: Instr like Semaphore with a Setable Timeout
clusardi2k@aol.com

2005-07-14, 7:48 am

Hello,

I am looking for instructions that do what a mutual exclusive
semaphore does but with some specifiable timeout for SGI and Red
Hat Linux. (I.E.: A Semaphore with a count of 1 but with a timeout)

In other words, I want to know how to guard a critical piece of
code, but I don't want to be forced to wait a long time in a
queue. In other words, I have processes that could go on living
without entering the critical section of code.

Thank you,
Christopher Lusardi

Tim Woodall

2005-07-14, 6:01 pm

On 14 Jul 2005 04:11:18 -0700,
clusardi2k@aol.com <clusardi2k@aol.com> wrote:
> Hello,
>
> I am looking for instructions that do what a mutual exclusive
> semaphore does but with some specifiable timeout for SGI and Red
> Hat Linux. (I.E.: A Semaphore with a count of 1 but with a timeout)
>
> In other words, I want to know how to guard a critical piece of
> code, but I don't want to be forced to wait a long time in a
> queue. In other words, I have processes that could go on living
> without entering the critical section of code.
>

semtimedop()? sem_trywait()?

Not sure exactly what you want (or whether IRIX is SystemV) but those
should be a start.

Tim.

--
God said, "div D = rho, div B = 0, curl E = - @B/@t, curl H = J + @D/@t,"
and there was light.

http://tjw.hn.org/ http://www.locofungus.btinternet.co.uk/
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com