On Mon, Aug 3, 2015 at 12:26 PM, lh_mouse <[email protected]> wrote: > ISO C11 requires operations on the same stream (or whatever a FILE struct > handles) _not_ to interleave with each other. > This should include outputting each character using puts() or printf() > functions, since they both manipulate the `stdout` stream. > > It should be noted that mingw-w64 has never claimed C11 compatibility. On the > other hand, GCC has enabled -std=gnu11 since GCC 5. > Such interleaving behavior would conflict with GCC's new default expectation. >
Thanks for reminder. > --- > WG14 N1570 (a.k.a. draft for ISO C11) > > 7.21.2 Streams > 7 Each stream has an associated lock that is used to prevent data races when > multiple > threads of execution access a stream, and to restrict the interleaving of > stream operations > performed by multiple threads. Only one thread may hold this lock at a time. > The lock is > reentrant: a single thread may hold the lock multiple times at a given time. > 8 All functions that read, write, position, or query the position of a stream > lock the stream > before accessing it. They release the lock associated with the stream when > the access is > complete. > Thanks for your information. The lock in the patch is not reentrant, correct ? ------------------------------------------------------------------------------ _______________________________________________ Mingw-w64-public mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
