ASSS Custom Projects - `PTHREAD_MUTEX_RECURSIVE' undeclared. Manic090 - Mon Dec 29, 2003 5:03 pm Post subject: `PTHREAD_MUTEX_RECURSIVE' undeclared.
When i try to compile Flag/Ball .c
Error Message
`PTHREAD_MUTEX_RECURSIVE' undeclared (first use in this function)
I think it might be that i did a bit of a dodge upgrade of glibc i only had 2.2.6, where 2.3 is needed.
Any help appreciated
Thanks
-Manic
Manic090 - Tue Dec 30, 2003 6:33 am Post subject:
Fixed.
pthread.h was missing the declaration, just needed to use a define to point it to pthread_mutex_recursive_np
-Manic
Grelminar - Thu Jan 01, 2004 7:36 pm Post subject:
Yeah, linux pthreads sort of sucks. PTHREAD_MUTEX_RECURSIVE is what posix says should be supported, but some versions of glibc have only PTHREAD_MUTEX_RECURSIVE_NP (the np stands for non-portable), when they have the same meaning.
At least we have NPTL plus kernel 2.6 to look forward to, which will make pthreads on linux fully conforming and faster too.