I have an application using posix threads ie using a static library which has some global variables and I dont have any thread implementation in libray. Somebody told me you should use pthread_mutex if you are using pthreads in that file else simple mutex.
As library is thread free so which lock (specially mutex) to use in library to protect globals.
I tried linux/kernel/mutex.h ie obviously bad to use kernel's object to use in user space and compiler too warning. So where will I get this simple mutex!!!