Re: [rtl] Mutex and Timers

2000-11-17 Thread Paolo Mantegazza
Ralf Ramrath wrote: > > Hi folks, > > I have the following problem: > > I have a "main thread" that has to read data from the serial port only if > any data is available. On the other hand, the thread must not wait longer > than let's say one second. > > The one thing ( reading only if data is

Re: [rtl] Mutex and Timers

2000-11-16 Thread yodaiken
On Thu, Nov 16, 2000 at 09:35:41PM +, Stuart Hughes wrote: > Ralf Ramrath wrote: > > > > Hi folks, > > > > I have the following problem: > > > > I have a "main thread" that has to read data from the serial port only if > > any data is available. On the other hand, the thread must not wait l

Re: [rtl] Mutex and Timers

2000-11-16 Thread Pierre Cloutier
Stuart Hughes wrote: > > Ralf Ramrath wrote: > > > > Hi folks, > > > > I have the following problem: > > > > I have a "main thread" that has to read data from the serial port only if > > any data is available. On the other hand, the thread must not wait longer > > than let's say one second. > >

Re: [rtl] Mutex and Timers

2000-11-16 Thread Stuart Hughes
Ralf Ramrath wrote: > > Hi folks, > > I have the following problem: > > I have a "main thread" that has to read data from the serial port only if > any data is available. On the other hand, the thread must not wait longer > than let's say one second. Hi Ralf, IMHO, the correct way to handle

[rtl] Mutex and Timers

2000-11-16 Thread Ralf Ramrath
Hi folks, I have the following problem: I have a "main thread" that has to read data from the serial port only if any data is available. On the other hand, the thread must not wait longer than let's say one second. The one thing ( reading only if data is available ) I implemented using a mutex