| To: | Schwarz Konrad <yyyyyyyyyyyyyy@xxxxxxxxxxx> |
|---|---|
| Subject: | Re: XSH/XRAT conflict over cancellation points |
| From: | Dave Butenhof <yyyyyyyyyyyyyy@xxxxxx> |
| Date: | Fri, 21 May 2004 07:49:22 -0400 |
| Cc: | yyyyyyyyyyyyyy@xxxxxxxxxxxxx |
| Organization: | Hewlett-Packard |
| References: | <2A8DB02E3018D411901B009027FD3A3F01CAB0C4@mchp905a.mch.sbs.de> |
Schwarz Konrad wrote: Hmm. Actually, I was thinking in terms of setjmp/longjmp or a C "inline" exception handler extension, with "out of line" code accessing the local 'i' variable. In fact, after thinking about it more I'm not really sure whether either could reasonably foul up access in this code, because you're "publishing" the address of 'i' via the pthread_cleanup_push() token (even if it's not a call the value must be held somewhere), and both read() and pthread_testcancel() are external calls. This may actually be perfectly safe.It doesn't say that in the standard! At least, I can't find it on(Actually, it may see neither, because my_handler is a separate routine that's probably invoked via something like an exception handler or longjmp, and 'i' is a local variable that's not even volatile. ;-) ) And to think I nearly deleted that wry little side comment of my reply, on which this digression is based, lest it detract from the real answer. Sigh. ;-) -- /--------------------[ yyyyyyyyyyyyyy@xxxxxx ]--------------------\ | Hewlett-Packard Company Tru64 UNIX & VMS Thread Architect | | My book: http://www.awl.com/cseng/titles/0-201-63392-2/ | \----[ http://homepage.mac.com/dbutenhof/Threads/Threads.html ]---/ |
| Previous by Date: | RE: XSH/XRAT conflict over cancellation points, Alexander Terekhov |
|---|---|
| Next by Date: | Re: XSH/XRAT conflict over cancellation points, Dave Butenhof |
| Previous by Thread: | Re: XSH/XRAT conflict over cancellation points, Dave Butenhof |
| Next by Thread: | Re: XSH/XRAT conflict over cancellation points, Alexander Terekhov |
| Indexes: | [Date] [Thread] [All Lists] |