[Subject Prev][Subject Next][Thread Prev][Thread Next][Subject Index][Thread Index]

Re: [LI] APIs for keeping track of time??



On Fri, Dec 03, 1999 at 03:06:23PM +0530, Guruprasad, Mahendrakar  V (IE10) wrote:
> 
> > 	Hi all.
> > 		As you know alarm( ) system call is system wide. I mean when
> > a process / thread sets the alarm value,
> > 		the previously set value will be reset to the newer one for
> > all processes/threads.

Wrong. Just for the calling process. man alarm.

> > 		But are there any equivalent APIs which are local to each
> > process/thread which don't interfere in others work?

On Linux, threads don't share signals. So you're still ok.
IIRC, this is a deviation from the POSIX behaviour. 
You can probably try using: pthread_cond_timedwait for
portable per thread alarm behaviour.

	-Arun

--------------------------------------------------------------------
The Linux India Mailing List Archives are now available.  Please search
the archive at http://lists.linux-india.org/ before posting your question
to avoid repetition and save bandwidth.