Hello, I'm new in this list and I apologize in advance if my questions
are too basic.
I'm writing an application which "talks" with a number of test devices
connected to a gpib card and I'm using for this the open source linux
gpib driver (http://linux-gpib.sourceforge.net).
This is a multithread application, each thread for each device as each
device has it's own device descriptor to read from and write to it.
Within various states of the state machine of each thread, I need to
implement a look, sending a query to the device for it's current state
and reading the response.
The loop may end in 2 ways: either the device has transitioned to a new
state or timeout has occured and no transition happened during this
time.
Those timers are my problem here. The timers may vary within a thread,
depending on the expected state and, each thread has to have it's own
timers independent of the other threads.
I cannot implement this by using alarm, setitimer and getitimer as they
are process wide and not thread safe.
So I wonder if libevent may be the appropriate tool to help me implement
those timers.
If indeed, then how should I use it and which functions are relevant for
this case?
I'll continue to investigate this by myself, but any assistance I can
get from the list members will be most appreciated.
Thanks in advance, and sorry for the lengthy and detailed message.
Regards, Rafi.
_______________________________________________
Libevent-users mailing list
Libevent-users@monkey.org
http://monkey.org/mailman/listinfo/libevent-users

Reply via email to