Author |
Message |
Manic090 Newbie
Age:37 Gender: Joined: Dec 28 2003 Posts: 4 Location: England Offline
|
Posted: 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 |
|
Back to top |
|
|
Manic090 Newbie
Age:37 Gender: Joined: Dec 28 2003 Posts: 4 Location: England Offline
|
Posted: 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 |
|
Back to top |
|
|
Grelminar Creator of Asss
Joined: Feb 26 2003 Posts: 378 Offline
|
Posted: 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. |
|
Back to top |
|
|
|