os/log.c thread safety

Keith Packard keithp at keithp.com
Mon Sep 19 04:58:12 UTC 2016


Jeremy Huddleston Sequoia <jeremyhu at apple.com> writes:

> [ Unknown signature status ]
> I noticed a data race in XQuartz.  We call ErrorF in a couple places off of the main server thread.  I could fix it by simply moving this logging onto the server thread (or not doing it with os/log), but with the split of InputThread off of MainThread, I'm wondering if it would be better to instead make ErrorF thread safe.
>
> Thoughts?

If we use ErrorF in server abort paths, then any thread safety might
block the server shutdown, which would be bad...

-- 
-keith
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 800 bytes
Desc: not available
URL: <https://lists.x.org/archives/xorg-devel/attachments/20160918/4053c1cd/attachment.sig>


More information about the xorg-devel mailing list