On z/OS, the availability of several POSIX functions depends on the
environment at program start. As a result, we don't know at compile
time if mutexes and multithreading is supported.
The z/OS Language Environment provides a flag CEEEDB_POSIX to check
whether POSIX functions (and thus threading support) is enabled. It
also provides a flag CEEEDBMULTITHREAD which is set to true when more
than 1 thread is running, which we can use as an alternative in some
cases to get a little extra performance out of single-threaded
applications.
This is the 1st of 4 changes to add support for POSIX(OFF) on z/OS.
See D117366 for more background, and D110349 for discussion of an
alternative implementation.