c11/threads: create mutexattrs only when needed
authorEmil Velikov <emil.velikov@collabora.com>
Sun, 24 Apr 2016 15:14:04 +0000 (16:14 +0100)
committerEmil Velikov <emil.l.velikov@gmail.com>
Mon, 23 May 2016 11:07:45 +0000 (12:07 +0100)
commit6ce11e7e2c6be033e0d712fc39359de7b955c2bf
tree8cd3b4f1488a6f9f80fc74e37f0f7d798ddbb56e
parent4424bf5da4f9cd18bb30fc14d1d8403e4ec6caff
c11/threads: create mutexattrs only when needed

If the mutexattrs are the default one can just pass NULL to
pthread_mutex_init. As the compiler does not know this detail it
unnecessarily creates/destroys the attrs.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
include/c11/threads_posix.h