
Anthony Williams wrote:
"Peter Dimov" <pdimov@mmltd.net> writes:
Alexander Terekhov wrote:
Anthony Williams wrote: [...]
typedef once_flag pthread_once_t; int pthread_once(pthread_once_t* once_control,void(*init_routine)()) { std::call_once(*once_control,init_routine); return 0; }
Right, the only problem is that folks like Drepper of Red Hat would rather commit suicide than accept the notion of pthread.h implementable in terms of <thread>. See the comedy at posix-c++-sg.
This is not a good idea for maintenance reasons, because it still leaves us with two separate implementations, one for POSIX, one for pthreads-over-C++ (which is currently a synonym for Windows.)
That's a non-starter of an argument. The alternative is C++-over-POSIX and C++-over-POSIX-over-xxx for non-pthreads platforms, which is still two implementations.
I'm not arguing. Anyway, it's still two implementations, but now they are independent and don't need to be kept in sync. Maintenance reasons, as I said.