Synopsis: [kernel] struct callout:c_flags should be volatile State-Changed-From-To: open->closed State-Changed-By: jilles State-Changed-When: Sun Apr 6 21:34:16 UTC 2014 State-Changed-Why: Hi,
Thanks for your request. I think the volatile qualifier should not be added. callout_active() should only be called when the callout's lock (Giant, given mutex or given rwlock) is held. The lock/unlock operations will force the compiler and CPU to fetch a new value. The volatile qualifier is not designed to protect against other threads, even though it might appear to help with that. In your example, note that DELAY is a busy-wait loop; it is sometimes useful to wait for hardware, but not to wait for software events. Responsible-Changed-From-To: freebsd-bugs->jilles Responsible-Changed-By: jilles Responsible-Changed-When: Sun Apr 6 21:34:16 UTC 2014 Responsible-Changed-Why: Track replies. http://www.freebsd.org/cgi/query-pr.cgi?pr=149591 _______________________________________________ [email protected] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-bugs To unsubscribe, send any mail to "[email protected]"
