[EMAIL PROTECTED] wrote:
The specific situation that raised the question is a signal handler. The same signal handler function was used for several signals that are all taken to mean "clean up and shut down". The function saved the signal to an unprotected global variable. If different signals are received, we don't care which one the global ends up being set to. The signal handler could be written differently to eliminate the atomicity question. But other scenarios come to mind also. Such as setting an error in a shared piece of memory (where it might be sufficient to attempt to keep the first error, but in race conditions perhaps get the second error). Right - this only applies to situations where any of the N values are acceptable.(After the update, the variable can have any of N values -Joe |
_______________________________________________ zfs-discuss mailing list [email protected] http://mail.opensolaris.org/mailman/listinfo/zfs-discuss
