|
On 16-Oct-06, at 2:16 PM, Glenn Maynard wrote:
On Mon, Oct 16, 2006 at 03:01:38PM -0400, Ralph Hempel wrote:Yes, but if the thread with this code is reading in between the non-atomic write of the other thread, are we not back where we started? :-)True. Just waking up. I'm uncomfortable with relying on atomic_t, though. I've never actually heard of it being a standard type, or seen it in any code outside of the Linux kernel, and that defines it itself.
atomic_t was my typo. As David and Roberto pointed out, I meant sig_atomic_t, which is in posix.
However, it doesn't solve any problems which have to do with threads.