NetBSD Problem Report #49529
From wiz@yt.nih.at Sat Jan 3 09:35:54 2015
Return-Path: <wiz@yt.nih.at>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (verified OK))
by mollari.NetBSD.org (Postfix) with ESMTPS id EFFE9A654B
for <gnats-bugs@gnats.NetBSD.org>; Sat, 3 Jan 2015 09:35:53 +0000 (UTC)
Message-Id: <20150103084813.EDF582AC0E0@yt.nih.at>
Date: Sat, 3 Jan 2015 09:48:13 +0100 (CET)
From: Thomas Klausner <wiz@NetBSD.org>
Reply-To: Thomas Klausner <wiz@NetBSD.org>
To: gnats-bugs@NetBSD.org
Subject: pthread_mutexattr_setpshared and pthread_condattr_setpshared missing
X-Send-Pr-Version: 3.95
>Number: 49529
>Category: lib
>Synopsis: pthread_mutexattr_setpshared and pthread_condattr_setpshared missing
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: lib-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sat Jan 03 09:40:00 +0000 2015
>Last-Modified: Thu Sep 24 23:35:00 +0000 2015
>Originator: Thomas Klausner
>Release: NetBSD 7.99.3
>Organization:
Curiosity is the very basis of education and if you tell me that
curiosity killed the cat, I say only that the cat died nobly.
- Arnold Edinborough
>Environment:
Architecture: x86_64
Machine: amd64
>Description:
POSIX describes two sets of functions in the Threads extension that
are not provided on NetBSD:
http://pubs.opengroup.org/onlinepubs/9699919799/functions/pthread_mutexattr_setpshared.html
http://pubs.opengroup.org/onlinepubs/9699919799/functions/pthread_condattr_setpshared.html
These are used by e.g. libxshmfence.
>How-To-Repeat:
Try to compile libxshmfence.
>Fix:
Please implement them!
>Audit-Trail:
From: "Tobias Nygren" <tnn@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/49529 CVS commit: pkgsrc/x11/libxshmfence
Date: Thu, 24 Sep 2015 23:34:16 +0000
Module Name: pkgsrc
Committed By: tnn
Date: Thu Sep 24 23:34:16 UTC 2015
Modified Files:
pkgsrc/x11/libxshmfence: DESCR Makefile distinfo
Added Files:
pkgsrc/x11/libxshmfence/files: xshmfence_semaphore.c
xshmfence_semaphore.h
pkgsrc/x11/libxshmfence/patches: patch-configure.ac
patch-src_Makefile.am patch-src_xshmfence__alloc.c
patch-src_xshmfenceint.h
Log Message:
Add makeshift NetBSD support using POSIX semaphores.
Not upstreamed because I think NetBSD should be given the chance to
implement some better interprocess synchronization primitives first.
See PR lib/49529.
In particular what's missing is an interprocess sync primitive that can:
1) be passed safely through MAP_SHARED memory
2) support atomic unlock-and-block (like pthread_cond_wait)
3) wake up all waiters at once
To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 pkgsrc/x11/libxshmfence/DESCR \
pkgsrc/x11/libxshmfence/distinfo
cvs rdiff -u -r1.2 -r1.3 pkgsrc/x11/libxshmfence/Makefile
cvs rdiff -u -r0 -r1.1 pkgsrc/x11/libxshmfence/files/xshmfence_semaphore.c \
pkgsrc/x11/libxshmfence/files/xshmfence_semaphore.h
cvs rdiff -u -r0 -r1.1 pkgsrc/x11/libxshmfence/patches/patch-configure.ac \
pkgsrc/x11/libxshmfence/patches/patch-src_Makefile.am \
pkgsrc/x11/libxshmfence/patches/patch-src_xshmfence__alloc.c \
pkgsrc/x11/libxshmfence/patches/patch-src_xshmfenceint.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2014
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.