[Issue 14617] PTHREAD_MUTEX_INITIALIZER does not work on OSX

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Sat May 23 10:45:38 PDT 2015


https://issues.dlang.org/show_bug.cgi?id=14617

--- Comment #3 from Steven Schveighoffer <schveiguy at yahoo.com> ---
A neat advantage over C is that we can define the .init value so we don't need
such an initializer. In fact, core.posix.pthread defines
PTHREAD_MUTEX_INITIALIZER as pthread_mutex_t.init.

However, there is an issue, because core/sys/posix/sys/types.d is not included
in the build. So if I define a new init, it won't be found (tried it).

I also tried updating the PTHREAD_MUTEX_INITIALIZER in pthread.d, and that also
is not found. So we need some Makefile updates in order to fix this. And I'm
not sure we want to do that. Thoughts?

--


More information about the Digitalmars-d-bugs mailing list