[Mono-dev] signal.c cross-thread access

tim.jenks at realtimeworlds.com tim.jenks at realtimeworlds.com
Thu Feb 12 09:51:04 EST 2009

Hi Jon,

Here's the changes you suggested. I'm now using poll() rather than
select() as discussed on Tuesday. The test reproducing multiple select()
on the same fd for the same operation that's working under poll is
included in mcs.diff.

This is contributed under MIT/X11


> -----Original Message-----
> From: Jonathan Pryor [mailto:jonpryor at vt.edu]
> Sent: 09 February 2009 14:08
> To: Tim Jenks
> Subject: RE: [Mono-dev] signal.c cross-thread access
> On Mon, 2009-02-09 at 12:31 +0000, tim.jenks at realtimeworlds.com wrote:
> > Here we can see one select is returning after the first char is sent
> to
> > the pipe (and reads 1 byte). The second char is then sent to the
> pipe,
> > but the second select() call does not unblock.
> >
> > I am assuming this is undefined behaviour when multiple threads
> select()
> > on the same fd for the same operation, although I cannot find any
> > documentation proving this.
> >
> > Having looked at epoll, this appears to be addressed.
> Is there any other mechanism?  epoll(2) doesn't seem to be supported
> Mac OS X (at least, it's not listed at [0]).  Would poll(2) work?
>  - Jon
> [0]
> ____________________________________________________________________
> This email has been scanned by the MessageLabs Email Security System


This message and any attachments contain privileged and confidential information intended for the use of the addressee named above. If you are not the intended recipient of this message, you are hereby notified that any use, dissemination, distribution or reproduction of this message is prohibited. Please note that we cannot guarantee that this message or any attachment is virus free or that it has not been intercepted and amended. The views of the author may not necessarily reflect those of Realtime Worlds Ltd.


Realtime Worlds Ltd is registered in Scotland, number 225628. Registered Office: 152 West Marketgait, Dundee, DD1 1NJ.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mcs.diff
Type: application/octet-stream
Size: 2596 bytes
Desc: mcs.diff
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20090212/63547424/attachment.obj 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signal.c.diff
Type: application/octet-stream
Size: 6585 bytes
Desc: signal.c.diff
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20090212/63547424/attachment-0001.obj 

More information about the Mono-devel-list mailing list