reentrancy, thread safe, asynchronous signal safe, interrupt safe and cancellation safe