, gcc, -D name name 1.
, _REENTRANT -, true 1.
, _REENTRANT false 0.
Take this example from /usr/include/features.h.
#if defined _REENTRANT || defined _THREAD_SAFE
# define __USE_REENTRANT 1
#endif
You will see that it tells the compiler what to do if the _REENTRANT parameter is defined.
Finally, you need to associate your library with the code pthread, so you can use the family pthread_*(), for example pthread_create(), pthread_join().
When -lpthreadpassed to the linker, the code binds to libpthread.so.
source
share