[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: concurrent access
Hi Will,
On Thu, 24 Feb 2000, Will Lockhart wrote:
> But that leads me on to another question (for the list):
>
> Lets say I have two framegrabber cards (PCDig in this case) in the
> machine, but only one (multithreaded) process handling the images from
> both cards. How do I know, when I get a SIGIO, which card generated
> it? Do I have to poll() the file descriptors for both cards?
>
Unfortunately, you don't know it. Poll is the right solution for one
process.
> On a similar subject, can anyone explain the interaction between
> signals, threads and fcntl(F_SETOWN)? According to the POSIX
> specification, a signal is delivered to an arbitrary thread within the
> process. You can force the signal to be delivered to a specific thread
> by blocking the signal in all threads, and sigwaiting for it in your
> signal handling thread.
>
> However, on Linux, each thread has its own PID, so does doing a
> fcntl(F_SETOWN) guarantee the signal is delivered to that thread?
I don't have tested it, but I also understand it this way. And from the
point of the kernel code it have to work so.
Perhaps there is a mailing list for linux threads to mail to?
Please let me know your results, if you have tested it!
> Any help on this would be greatly appreciated.
>
> Will
>
> --
> Will Lockhart, System Developer, Axiom (Cambridge) Ltd.
> http://www.mvhi.com/
>
matthias