Subject: pthread_equal() -- stub or macro?
To: None <tech-userlevel@netbsd.org>
From: Matthias Drochner <M.Drochner@fz-juelich.de>
List: tech-userlevel
Date: 09/18/2007 20:33:05
Hi -
there are some libraries which want to be threadsafe while
not deploying threads by theirselfes. That's what we have
the stubs in libc for.

pthread_equal() is missing here. It certainly makes sense
to use it in libraries to ensure thread safety -- just stumbled
over it in HDF5 which has its own recursive mutex implementation.
(And there are more, eg libxml2. Also see PR lib/29952.)

It would be straightforward to add it to libc/thread-stub.
But in this simple case: would it be wrong to simply make
it a macro?

best regards
Matthias




-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
Forschungszentrum Juelich GmbH
52425 Juelich

Sitz der Gesellschaft: Juelich
Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498
Vorsitzende des Aufsichtsrats: MinDirig'in Baerbel Brumme-Bothe
Vorstand: Prof. Dr. Achim Bachem (Vorsitzender), Dr. Ulrich Krafft (stellv. 
Vorsitzender)
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------