[ANNOUNCE] libxshmfence 1.2

Keith Packard keithp at keithp.com
Fri Jan 2 20:15:00 PST 2015


Thomas Klausner <wiz at NetBSD.org> writes:

> Hi!
>
> This version doesn't build for me on NetBSD-7.99.3/amd64 and gcc-4.8.4 with:
>
>   CC       xshmfence_pthread.lo
> xshmfence_pthread.c: In function 'xshmfence_init':
> xshmfence_pthread.c:122:5: error: implicit declaration of function 'pthread_mutexattr_setpshared' [-Werror=implicit-function-declaration]
>      pthread_mutexattr_setpshared(&mutex_attr, PTHREAD_PROCESS_SHARED);
>      ^
> xshmfence_pthread.c:122:5: warning: nested extern declaration of 'pthread_mutexattr_setpshared' [-Wnested-externs]
> xshmfence_pthread.c:126:5: error: implicit declaration of function 'pthread_condattr_setpshared' [-Werror=implicit-function-declaration]
>      pthread_condattr_setpshared(&cond_attr, PTHREAD_PROCESS_SHARED);
>      ^
> xshmfence_pthread.c:126:5: warning: nested extern declaration of 'pthread_condattr_setpshared' [-Wnested-externs]
>
> "man pthread_condattr_setpshared" comes up empty too. Is there another
> more portable function you could use here?

This code hasn't changed since version 1.1. I believe both of these are
part of the POSIX threads API, as described in the single unix spec
here:

http://www.unix.org/version2/whatsnew/login_threads.html

If the NetBSD mutexes can be shared across processes, and yet doesn't
have these functions, then it's probably reasonable to add tests to the
build process that enable the library even in the absence of them.

-- 
-keith
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 810 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg/attachments/20150102/c833dc04/attachment.sig>


More information about the xorg mailing list