Re: os/log.c thread safety

2016-09-19 Thread Keith Packard
Jeremy Huddleston Sequoia writes: > FWIW, the issues surround these globals: > bufferUnused > bufferPos > LogSWrite.newline How about creating a separate mutex for these? It looks like we can do some minor reordering of code so that the mutex wouldn't need to be held across system ca

Re: os/log.c thread safety

2016-09-19 Thread Jeremy Huddleston Sequoia
> On Sep 18, 2016, at 21:58, Keith Packard wrote: > > Jeremy Huddleston Sequoia 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

Re: os/log.c thread safety

2016-09-18 Thread Keith Packard
Jeremy Huddleston Sequoia 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 >