Roland McGrath <[EMAIL PROTECTED]> writes:
> instead of the separate tests done now (and same for the other two). That
> way, dn_set_mtime is only touched if it was just acted upon--if it gets set
> right after the test, then it will remain set for later. Then it would be
> safe to just remove that assert and let the update take place later.
>From what I recall from the Threads Programming book, that sounds a
little dangerous. Doing proper locking does not only implement mutual
exclusion, it is also required to sync memory between different
threads (potentially running on different cpu:s). I don't thing
there's any datatype that is guaranteed to change atomically when
accessed from several threads without locking (or perhaps glibc makes
such guarantees about int or sigatomic_t or some such?)
Probably, nothing of this matters much for typical uniprocessors.
/Niels
_______________________________________________
Bug-hurd mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-hurd