Implement sem_timedwait.

This commit is contained in:
joerg 2012-03-08 21:59:24 +00:00
parent 3bd1fd2afe
commit 4acff4c01b
42 changed files with 959 additions and 755 deletions

View File

@ -1,4 +1,4 @@
# $NetBSD: ad.mips64eb,v 1.85 2012/02/29 20:07:51 tron Exp $
# $NetBSD: ad.mips64eb,v 1.86 2012/03/08 21:59:24 joerg Exp $
./libexec/ld.elf_so-64 base-compat-shlib compat,pic
./libexec/ld.elf_so-o32 base-sysutil-bin compat,pic
./usr/lib/64 base-compat-lib
@ -66,7 +66,7 @@
./usr/lib/64/libbz2.so.1 base-compat-shlib compat,pic
./usr/lib/64/libbz2.so.1.1 base-compat-shlib compat,pic
./usr/lib/64/libc.so.12 base-compat-shlib compat,pic
./usr/lib/64/libc.so.12.182 base-compat-shlib compat,pic
./usr/lib/64/libc.so.12.183 base-compat-shlib compat,pic
./usr/lib/64/libcom_err.so.7 base-compat-shlib compat,pic,kerberos
./usr/lib/64/libcom_err.so.7.0 base-compat-shlib compat,pic,kerberos
./usr/lib/64/libcrypt.so.1 base-compat-shlib compat,pic
@ -196,7 +196,7 @@
./usr/lib/64/libprop.so.1 base-compat-shlib compat,pic
./usr/lib/64/libprop.so.1.1 base-compat-shlib compat,pic
./usr/lib/64/libpthread.so.1 base-compat-shlib compat,pic
./usr/lib/64/libpthread.so.1.0 base-compat-shlib compat,pic
./usr/lib/64/libpthread.so.1.1 base-compat-shlib compat,pic
./usr/lib/64/libpthread_dbg.so.2 base-compat-shlib compat,pic
./usr/lib/64/libpthread_dbg.so.2.0 base-compat-shlib compat,pic
./usr/lib/64/libpuffs.so.2 base-compat-shlib compat,pic
@ -214,7 +214,7 @@
./usr/lib/64/librpcsvc.so.1 base-compat-shlib compat,pic
./usr/lib/64/librpcsvc.so.1.0 base-compat-shlib compat,pic
./usr/lib/64/librt.so.1 base-compat-shlib compat,pic
./usr/lib/64/librt.so.1.0 base-compat-shlib compat,pic
./usr/lib/64/librt.so.1.1 base-compat-shlib compat,pic
./usr/lib/64/librump.so.0 base-compat-shlib compat,pic
./usr/lib/64/librump.so.0.0 base-compat-shlib compat,pic
./usr/lib/64/librumpclient.so.0 base-compat-shlib compat,pic
@ -364,7 +364,7 @@
./usr/lib/o32/libbz2.so.1 base-compat-shlib compat,pic
./usr/lib/o32/libbz2.so.1.1 base-compat-shlib compat,pic
./usr/lib/o32/libc.so.12 base-compat-shlib compat,pic
./usr/lib/o32/libc.so.12.182 base-compat-shlib compat,pic
./usr/lib/o32/libc.so.12.183 base-compat-shlib compat,pic
./usr/lib/o32/libcom_err.so.7 base-compat-shlib compat,pic,kerberos
./usr/lib/o32/libcom_err.so.7.0 base-compat-shlib compat,pic,kerberos
./usr/lib/o32/libcrypt.so.1 base-compat-shlib compat,pic
@ -494,7 +494,7 @@
./usr/lib/o32/libprop.so.1 base-compat-shlib compat,pic
./usr/lib/o32/libprop.so.1.1 base-compat-shlib compat,pic
./usr/lib/o32/libpthread.so.1 base-compat-shlib compat,pic
./usr/lib/o32/libpthread.so.1.0 base-compat-shlib compat,pic
./usr/lib/o32/libpthread.so.1.1 base-compat-shlib compat,pic
./usr/lib/o32/libpthread_dbg.so.2 base-compat-shlib compat,pic
./usr/lib/o32/libpthread_dbg.so.2.0 base-compat-shlib compat,pic
./usr/lib/o32/libpuffs.so.2 base-compat-shlib compat,pic
@ -512,7 +512,7 @@
./usr/lib/o32/librpcsvc.so.1 base-compat-shlib compat,pic
./usr/lib/o32/librpcsvc.so.1.0 base-compat-shlib compat,pic
./usr/lib/o32/librt.so.1 base-compat-shlib compat,pic
./usr/lib/o32/librt.so.1.0 base-compat-shlib compat,pic
./usr/lib/o32/librt.so.1.1 base-compat-shlib compat,pic
./usr/lib/o32/librump.so.0 base-compat-shlib compat,pic
./usr/lib/o32/librump.so.0.0 base-compat-shlib compat,pic
./usr/lib/o32/librumpclient.so.0 base-compat-shlib compat,pic

View File

@ -1,4 +1,4 @@
# $NetBSD: ad.mips64el,v 1.84 2012/02/29 20:07:51 tron Exp $
# $NetBSD: ad.mips64el,v 1.85 2012/03/08 21:59:24 joerg Exp $
./libexec/ld.elf_so-64 base-compat-shlib compat,pic
./libexec/ld.elf_so-o32 base-sysutil-bin compat,pic
./usr/lib/64 base-compat-lib
@ -66,7 +66,7 @@
./usr/lib/64/libbz2.so.1 base-compat-shlib compat,pic
./usr/lib/64/libbz2.so.1.1 base-compat-shlib compat,pic
./usr/lib/64/libc.so.12 base-compat-shlib compat,pic
./usr/lib/64/libc.so.12.182 base-compat-shlib compat,pic
./usr/lib/64/libc.so.12.183 base-compat-shlib compat,pic
./usr/lib/64/libcom_err.so.7 base-compat-shlib compat,pic,kerberos
./usr/lib/64/libcom_err.so.7.0 base-compat-shlib compat,pic,kerberos
./usr/lib/64/libcrypt.so.1 base-compat-shlib compat,pic
@ -196,7 +196,7 @@
./usr/lib/64/libprop.so.1 base-compat-shlib compat,pic
./usr/lib/64/libprop.so.1.1 base-compat-shlib compat,pic
./usr/lib/64/libpthread.so.1 base-compat-shlib compat,pic
./usr/lib/64/libpthread.so.1.0 base-compat-shlib compat,pic
./usr/lib/64/libpthread.so.1.1 base-compat-shlib compat,pic
./usr/lib/64/libpthread_dbg.so.2 base-compat-shlib compat,pic
./usr/lib/64/libpthread_dbg.so.2.0 base-compat-shlib compat,pic
./usr/lib/64/libpuffs.so.2 base-compat-shlib compat,pic
@ -214,7 +214,7 @@
./usr/lib/64/librpcsvc.so.1 base-compat-shlib compat,pic
./usr/lib/64/librpcsvc.so.1.0 base-compat-shlib compat,pic
./usr/lib/64/librt.so.1 base-compat-shlib compat,pic
./usr/lib/64/librt.so.1.0 base-compat-shlib compat,pic
./usr/lib/64/librt.so.1.1 base-compat-shlib compat,pic
./usr/lib/64/librump.so.0 base-compat-shlib compat,pic
./usr/lib/64/librump.so.0.0 base-compat-shlib compat,pic
./usr/lib/64/librumpclient.so.0 base-compat-shlib compat,pic
@ -364,7 +364,7 @@
./usr/lib/o32/libbz2.so.1 base-compat-shlib compat,pic
./usr/lib/o32/libbz2.so.1.1 base-compat-shlib compat,pic
./usr/lib/o32/libc.so.12 base-compat-shlib compat,pic
./usr/lib/o32/libc.so.12.182 base-compat-shlib compat,pic
./usr/lib/o32/libc.so.12.183 base-compat-shlib compat,pic
./usr/lib/o32/libcom_err.so.7 base-compat-shlib compat,pic,kerberos
./usr/lib/o32/libcom_err.so.7.0 base-compat-shlib compat,pic,kerberos
./usr/lib/o32/libcrypt.so.1 base-compat-shlib compat,pic
@ -494,7 +494,7 @@
./usr/lib/o32/libprop.so.1 base-compat-shlib compat,pic
./usr/lib/o32/libprop.so.1.1 base-compat-shlib compat,pic
./usr/lib/o32/libpthread.so.1 base-compat-shlib compat,pic
./usr/lib/o32/libpthread.so.1.0 base-compat-shlib compat,pic
./usr/lib/o32/libpthread.so.1.1 base-compat-shlib compat,pic
./usr/lib/o32/libpthread_dbg.so.2 base-compat-shlib compat,pic
./usr/lib/o32/libpthread_dbg.so.2.0 base-compat-shlib compat,pic
./usr/lib/o32/libpuffs.so.2 base-compat-shlib compat,pic
@ -512,7 +512,7 @@
./usr/lib/o32/librpcsvc.so.1 base-compat-shlib compat,pic
./usr/lib/o32/librpcsvc.so.1.0 base-compat-shlib compat,pic
./usr/lib/o32/librt.so.1 base-compat-shlib compat,pic
./usr/lib/o32/librt.so.1.0 base-compat-shlib compat,pic
./usr/lib/o32/librt.so.1.1 base-compat-shlib compat,pic
./usr/lib/o32/librump.so.0 base-compat-shlib compat,pic
./usr/lib/o32/librump.so.0.0 base-compat-shlib compat,pic
./usr/lib/o32/librumpclient.so.0 base-compat-shlib compat,pic

View File

@ -1,4 +1,4 @@
# $NetBSD: md.amd64,v 1.159 2012/02/29 20:07:51 tron Exp $
# $NetBSD: md.amd64,v 1.160 2012/03/08 21:59:24 joerg Exp $
./dev/lms0 base-obsolete obsolete
./dev/mms0 base-obsolete obsolete
./libexec/ld.elf_so-i386 base-sys-shlib compat,pic
@ -69,7 +69,7 @@
./usr/lib/i386/libbz2.so.1 base-compat-shlib compat,pic
./usr/lib/i386/libbz2.so.1.1 base-compat-shlib compat,pic
./usr/lib/i386/libc.so.12 base-compat-shlib compat,pic
./usr/lib/i386/libc.so.12.182 base-compat-shlib compat,pic
./usr/lib/i386/libc.so.12.183 base-compat-shlib compat,pic
./usr/lib/i386/libcom_err.so.7 base-compat-shlib compat,pic,kerberos
./usr/lib/i386/libcom_err.so.7.0 base-compat-shlib compat,pic,kerberos
./usr/lib/i386/libcrypt.so.1 base-compat-shlib compat,pic
@ -203,7 +203,7 @@
./usr/lib/i386/libprop.so.1 base-compat-shlib compat,pic
./usr/lib/i386/libprop.so.1.1 base-compat-shlib compat,pic
./usr/lib/i386/libpthread.so.1 base-compat-shlib compat,pic
./usr/lib/i386/libpthread.so.1.0 base-compat-shlib compat,pic
./usr/lib/i386/libpthread.so.1.1 base-compat-shlib compat,pic
./usr/lib/i386/libpthread_dbg.so.2 base-compat-shlib compat,pic
./usr/lib/i386/libpthread_dbg.so.2.0 base-compat-shlib compat,pic
./usr/lib/i386/libpuffs.so.2 base-compat-shlib compat,pic
@ -221,7 +221,7 @@
./usr/lib/i386/librpcsvc.so.1 base-compat-shlib compat,pic
./usr/lib/i386/librpcsvc.so.1.0 base-compat-shlib compat,pic
./usr/lib/i386/librt.so.1 base-compat-shlib compat,pic
./usr/lib/i386/librt.so.1.0 base-compat-shlib compat,pic
./usr/lib/i386/librt.so.1.1 base-compat-shlib compat,pic
./usr/lib/i386/librump.so.0 base-compat-shlib compat,pic
./usr/lib/i386/librump.so.0.0 base-compat-shlib compat,pic
./usr/lib/i386/librumpcrypto.so.0 base-obsolete obsolete

View File

@ -1,4 +1,4 @@
# $NetBSD: md.sparc64,v 1.150 2012/02/29 20:07:51 tron Exp $
# $NetBSD: md.sparc64,v 1.151 2012/03/08 21:59:24 joerg Exp $
./libexec/ld.elf_so-sparc base-sysutil-bin compat,pic
./sbin/edlabel base-sysutil-root obsolete
./usr/bin/fdformat base-util-bin
@ -67,7 +67,7 @@
./usr/lib/sparc/libbz2.so.1 base-compat-shlib compat,pic
./usr/lib/sparc/libbz2.so.1.1 base-compat-shlib compat,pic
./usr/lib/sparc/libc.so.12 base-compat-shlib compat,pic
./usr/lib/sparc/libc.so.12.182 base-compat-shlib compat,pic
./usr/lib/sparc/libc.so.12.183 base-compat-shlib compat,pic
./usr/lib/sparc/libcom_err.so.7 base-compat-shlib compat,pic,kerberos
./usr/lib/sparc/libcom_err.so.7.0 base-compat-shlib compat,pic,kerberos
./usr/lib/sparc/libcrypt.so.1 base-compat-shlib compat,pic
@ -199,7 +199,7 @@
./usr/lib/sparc/libprop.so.1 base-compat-shlib compat,pic
./usr/lib/sparc/libprop.so.1.1 base-compat-shlib compat,pic
./usr/lib/sparc/libpthread.so.1 base-compat-shlib compat,pic
./usr/lib/sparc/libpthread.so.1.0 base-compat-shlib compat,pic
./usr/lib/sparc/libpthread.so.1.1 base-compat-shlib compat,pic
./usr/lib/sparc/libpthread_dbg.so.2 base-compat-shlib compat,pic
./usr/lib/sparc/libpthread_dbg.so.2.0 base-compat-shlib compat,pic
./usr/lib/sparc/libpuffs.so.2 base-compat-shlib compat,pic
@ -217,7 +217,7 @@
./usr/lib/sparc/librpcsvc.so.1 base-compat-shlib compat,pic
./usr/lib/sparc/librpcsvc.so.1.0 base-compat-shlib compat,pic
./usr/lib/sparc/librt.so.1 base-compat-shlib compat,pic
./usr/lib/sparc/librt.so.1.0 base-compat-shlib compat,pic
./usr/lib/sparc/librt.so.1.1 base-compat-shlib compat,pic
./usr/lib/sparc/librump.so.0 base-compat-shlib compat,pic
./usr/lib/sparc/librump.so.0.0 base-compat-shlib compat,pic
./usr/lib/sparc/librumpclient.so.0 base-compat-shlib compat,pic

View File

@ -1,4 +1,4 @@
# $NetBSD: shl.mi,v 1.619 2012/02/29 20:07:52 tron Exp $
# $NetBSD: shl.mi,v 1.620 2012/03/08 21:59:24 joerg Exp $
#
# Note: Don't delete entries from here - mark them as "obsolete" instead,
# unless otherwise stated below.
@ -15,7 +15,7 @@
#
./lib/libc.so base-sys-shlib dynamicroot
./lib/libc.so.12 base-sys-shlib dynamicroot
./lib/libc.so.12.182 base-sys-shlib dynamicroot
./lib/libc.so.12.183 base-sys-shlib dynamicroot
./lib/libcrypt.so base-sys-shlib dynamicroot
./lib/libcrypt.so.1 base-sys-shlib dynamicroot
./lib/libcrypt.so.1.0 base-sys-shlib dynamicroot
@ -173,7 +173,7 @@
./usr/lib/libbz2.so.1.1 base-sys-shlib
./usr/lib/libc.so base-sys-shlib
./usr/lib/libc.so.12 base-sys-shlib
./usr/lib/libc.so.12.182 base-sys-shlib
./usr/lib/libc.so.12.183 base-sys-shlib
./usr/lib/libcdk.so base-obsolete obsolete
./usr/lib/libcom_err.so base-krb5-shlib kerberos
./usr/lib/libcom_err.so.7 base-krb5-shlib kerberos
@ -378,7 +378,7 @@
./usr/lib/libprop.so.1.1 base-sys-shlib
./usr/lib/libpthread.so base-sys-shlib
./usr/lib/libpthread.so.1 base-sys-shlib
./usr/lib/libpthread.so.1.0 base-sys-shlib
./usr/lib/libpthread.so.1.1 base-sys-shlib
./usr/lib/libpthread_dbg.so base-sys-shlib
./usr/lib/libpthread_dbg.so.2 base-sys-shlib
./usr/lib/libpthread_dbg.so.2.0 base-sys-shlib
@ -405,7 +405,7 @@
./usr/lib/librpcsvc.so.1.0 base-net-shlib
./usr/lib/librt.so base-sys-shlib
./usr/lib/librt.so.1 base-sys-shlib
./usr/lib/librt.so.1.0 base-sys-shlib
./usr/lib/librt.so.1.1 base-sys-shlib
./usr/lib/librump.so base-rump-shlib
./usr/lib/librump.so.0 base-rump-shlib
./usr/lib/librump.so.0.0 base-rump-shlib

View File

@ -1,4 +1,4 @@
# $NetBSD: ad.mips64eb,v 1.72 2012/02/29 20:07:52 tron Exp $
# $NetBSD: ad.mips64eb,v 1.73 2012/03/08 21:59:25 joerg Exp $
./usr/bin/elf2aout comp-obsolete obsolete
./usr/bin/elf2ecoff comp-sysutil-bin
./usr/include/gcc-4.5/loongson.h comp-c-include gcccmds,gcc=45
@ -1274,7 +1274,7 @@
./usr/libdata/debug/usr/lib/64/libbluetooth.so.4.2.debug comp-sys-debug debug,compat
./usr/libdata/debug/usr/lib/64/libbsdmalloc.so.0.0.debug comp-sys-debug debug,compat
./usr/libdata/debug/usr/lib/64/libbz2.so.1.1.debug comp-sys-debug debug,compat
./usr/libdata/debug/usr/lib/64/libc.so.12.182.debug comp-sys-debug debug,compat
./usr/libdata/debug/usr/lib/64/libc.so.12.183.debug comp-sys-debug debug,compat
./usr/libdata/debug/usr/lib/64/libcom_err.so.6.0.debug comp-compat-shlib compat,pic,kerberos,debug,obsolete
./usr/libdata/debug/usr/lib/64/libcom_err.so.7.0.debug comp-compat-shlib compat,pic,kerberos,debug
./usr/libdata/debug/usr/lib/64/libcrypt.so.1.0.debug comp-sys-debug debug,compat
@ -1353,7 +1353,7 @@
./usr/libdata/debug/usr/lib/64/libposix.so.0.1.debug comp-sys-debug debug,compat
./usr/libdata/debug/usr/lib/64/libppath.so.0.0.debug comp-sys-debug debug,compat
./usr/libdata/debug/usr/lib/64/libprop.so.1.1.debug comp-sys-debug debug,compat
./usr/libdata/debug/usr/lib/64/libpthread.so.1.0.debug comp-sys-debug debug,compat
./usr/libdata/debug/usr/lib/64/libpthread.so.1.1.debug comp-sys-debug debug,compat
./usr/libdata/debug/usr/lib/64/libpthread_dbg.so.2.0.debug comp-sys-debug debug,compat
./usr/libdata/debug/usr/lib/64/libpuffs.so.2.0.debug comp-puffs-debug debug,compat
./usr/libdata/debug/usr/lib/64/libquota.so.1.0.debug comp-sys-debug debug,compat
@ -1363,7 +1363,7 @@
./usr/libdata/debug/usr/lib/64/libroken.so.14.0.debug comp-compat-shlib compat,pic,kerberos,debug,obsolete
./usr/libdata/debug/usr/lib/64/libroken.so.19.0.debug comp-compat-shlib compat,pic,kerberos,debug
./usr/libdata/debug/usr/lib/64/librpcsvc.so.1.0.debug comp-net-debug debug,compat
./usr/libdata/debug/usr/lib/64/librt.so.1.0.debug comp-sys-debug debug,compat
./usr/libdata/debug/usr/lib/64/librt.so.1.1.debug comp-sys-debug debug,compat
./usr/libdata/debug/usr/lib/64/librump.so.0.0.debug comp-rump-debug debug,compat
./usr/libdata/debug/usr/lib/64/librumpclient.so.0.0.debug comp-rump-debug debug,compat
./usr/libdata/debug/usr/lib/64/librumpcrypto.so.0.0.debug comp-obsolete obsolete,compat
@ -1427,7 +1427,7 @@
./usr/libdata/debug/usr/lib/o32/libbluetooth.so.4.2.debug comp-sys-debug debug,compat
./usr/libdata/debug/usr/lib/o32/libbsdmalloc.so.0.0.debug comp-sys-debug debug,compat
./usr/libdata/debug/usr/lib/o32/libbz2.so.1.1.debug comp-sys-debug debug,compat
./usr/libdata/debug/usr/lib/o32/libc.so.12.182.debug comp-sys-debug debug,compat
./usr/libdata/debug/usr/lib/o32/libc.so.12.183.debug comp-sys-debug debug,compat
./usr/libdata/debug/usr/lib/o32/libcom_err.so.6.0.debug comp-compat-shlib compat,pic,kerberos,debug,obsolete
./usr/libdata/debug/usr/lib/o32/libcom_err.so.7.0.debug comp-compat-shlib compat,pic,kerberos,debug
./usr/libdata/debug/usr/lib/o32/libcrypt.so.1.0.debug comp-sys-debug debug,compat
@ -1506,7 +1506,7 @@
./usr/libdata/debug/usr/lib/o32/libposix.so.0.1.debug comp-sys-debug debug,compat
./usr/libdata/debug/usr/lib/o32/libppath.so.0.0.debug comp-sys-debug debug,compat
./usr/libdata/debug/usr/lib/o32/libprop.so.1.1.debug comp-sys-debug debug,compat
./usr/libdata/debug/usr/lib/o32/libpthread.so.1.0.debug comp-sys-debug debug,compat
./usr/libdata/debug/usr/lib/o32/libpthread.so.1.1.debug comp-sys-debug debug,compat
./usr/libdata/debug/usr/lib/o32/libpthread_dbg.so.2.0.debug comp-sys-debug debug,compat
./usr/libdata/debug/usr/lib/o32/libpuffs.so.2.0.debug comp-puffs-debug debug,compat
./usr/libdata/debug/usr/lib/o32/libquota.so.1.0.debug comp-sys-debug debug,compat
@ -1516,7 +1516,7 @@
./usr/libdata/debug/usr/lib/o32/libroken.so.14.0.debug comp-compat-shlib compat,pic,kerberos,debug,obsolete
./usr/libdata/debug/usr/lib/o32/libroken.so.19.0.debug comp-compat-shlib compat,pic,kerberos,debug
./usr/libdata/debug/usr/lib/o32/librpcsvc.so.1.0.debug comp-net-debug debug,compat
./usr/libdata/debug/usr/lib/o32/librt.so.1.0.debug comp-sys-debug debug,compat
./usr/libdata/debug/usr/lib/o32/librt.so.1.1.debug comp-sys-debug debug,compat
./usr/libdata/debug/usr/lib/o32/librump.so.0.0.debug comp-rump-debug debug,compat
./usr/libdata/debug/usr/lib/o32/librumpclient.so.0.0.debug comp-rump-debug debug,compat
./usr/libdata/debug/usr/lib/o32/librumpcrypto.so.0.0.debug comp-obsolete obsolete,compat

View File

@ -1,4 +1,4 @@
# $NetBSD: ad.mips64el,v 1.73 2012/03/02 23:13:55 matt Exp $
# $NetBSD: ad.mips64el,v 1.74 2012/03/08 21:59:25 joerg Exp $
./usr/bin/elf2aout comp-obsolete obsolete
./usr/bin/elf2ecoff comp-sysutil-bin
./usr/include/gcc-4.5/loongson.h comp-c-include gcccmds,gcc=45
@ -1274,7 +1274,7 @@
./usr/libdata/debug/usr/lib/64/libbluetooth.so.4.2.debug comp-sys-debug debug,compat
./usr/libdata/debug/usr/lib/64/libbsdmalloc.so.0.0.debug comp-sys-debug debug,compat
./usr/libdata/debug/usr/lib/64/libbz2.so.1.1.debug comp-sys-debug debug,compat
./usr/libdata/debug/usr/lib/64/libc.so.12.182.debug comp-sys-debug debug,compat
./usr/libdata/debug/usr/lib/64/libc.so.12.183.debug comp-sys-debug debug,compat
./usr/libdata/debug/usr/lib/64/libcom_err.so.6.0.debug comp-compat-shlib compat,pic,kerberos,debug,obsolete
./usr/libdata/debug/usr/lib/64/libcom_err.so.7.0.debug comp-compat-shlib compat,pic,kerberos,debug
./usr/libdata/debug/usr/lib/64/libcrypt.so.1.0.debug comp-sys-debug debug,compat
@ -1353,7 +1353,7 @@
./usr/libdata/debug/usr/lib/64/libposix.so.0.1.debug comp-sys-debug debug,compat
./usr/libdata/debug/usr/lib/64/libppath.so.0.0.debug comp-sys-debug debug,compat
./usr/libdata/debug/usr/lib/64/libprop.so.1.1.debug comp-sys-debug debug,compat
./usr/libdata/debug/usr/lib/64/libpthread.so.1.0.debug comp-sys-debug debug,compat
./usr/libdata/debug/usr/lib/64/libpthread.so.1.1.debug comp-sys-debug debug,compat
./usr/libdata/debug/usr/lib/64/libpthread_dbg.so.2.0.debug comp-sys-debug debug,compat
./usr/libdata/debug/usr/lib/64/libpuffs.so.2.0.debug comp-puffs-debug debug,compat
./usr/libdata/debug/usr/lib/64/libquota.so.1.0.debug comp-sys-debug debug,compat
@ -1363,7 +1363,7 @@
./usr/libdata/debug/usr/lib/64/libroken.so.14.0.debug comp-compat-shlib compat,pic,kerberos,debug,obsolete
./usr/libdata/debug/usr/lib/64/libroken.so.19.0.debug comp-compat-shlib compat,pic,kerberos,debug
./usr/libdata/debug/usr/lib/64/librpcsvc.so.1.0.debug comp-net-debug debug,compat
./usr/libdata/debug/usr/lib/64/librt.so.1.0.debug comp-sys-debug debug,compat
./usr/libdata/debug/usr/lib/64/librt.so.1.1.debug comp-sys-debug debug,compat
./usr/libdata/debug/usr/lib/64/librump.so.0.0.debug comp-rump-debug debug,compat
./usr/libdata/debug/usr/lib/64/librumpclient.so.0.0.debug comp-rump-debug debug,compat
./usr/libdata/debug/usr/lib/64/librumpcrypto.so.0.0.debug comp-obsolete obsolete,compat
@ -1427,7 +1427,7 @@
./usr/libdata/debug/usr/lib/o32/libbluetooth.so.4.2.debug comp-sys-debug debug,compat
./usr/libdata/debug/usr/lib/o32/libbsdmalloc.so.0.0.debug comp-sys-debug debug,compat
./usr/libdata/debug/usr/lib/o32/libbz2.so.1.1.debug comp-sys-debug debug,compat
./usr/libdata/debug/usr/lib/o32/libc.so.12.182.debug comp-sys-debug debug,compat
./usr/libdata/debug/usr/lib/o32/libc.so.12.183.debug comp-sys-debug debug,compat
./usr/libdata/debug/usr/lib/o32/libcom_err.so.6.0.debug comp-compat-shlib compat,pic,kerberos,debug,obsolete
./usr/libdata/debug/usr/lib/o32/libcom_err.so.7.0.debug comp-compat-shlib compat,pic,kerberos,debug
./usr/libdata/debug/usr/lib/o32/libcrypt.so.1.0.debug comp-sys-debug debug,compat
@ -1506,7 +1506,7 @@
./usr/libdata/debug/usr/lib/o32/libposix.so.0.1.debug comp-sys-debug debug,compat
./usr/libdata/debug/usr/lib/o32/libppath.so.0.0.debug comp-sys-debug debug,compat
./usr/libdata/debug/usr/lib/o32/libprop.so.1.1.debug comp-sys-debug debug,compat
./usr/libdata/debug/usr/lib/o32/libpthread.so.1.0.debug comp-sys-debug debug,compat
./usr/libdata/debug/usr/lib/o32/libpthread.so.1.1.debug comp-sys-debug debug,compat
./usr/libdata/debug/usr/lib/o32/libpthread_dbg.so.2.0.debug comp-sys-debug debug,compat
./usr/libdata/debug/usr/lib/o32/libpuffs.so.2.0.debug comp-puffs-debug debug,compat
./usr/libdata/debug/usr/lib/o32/libquota.so.1.0.debug comp-sys-debug debug,compat
@ -1516,7 +1516,7 @@
./usr/libdata/debug/usr/lib/o32/libroken.so.14.0.debug comp-compat-shlib compat,pic,kerberos,debug,obsolete
./usr/libdata/debug/usr/lib/o32/libroken.so.19.0.debug comp-compat-shlib compat,pic,kerberos,debug
./usr/libdata/debug/usr/lib/o32/librpcsvc.so.1.0.debug comp-net-debug debug,compat
./usr/libdata/debug/usr/lib/o32/librt.so.1.0.debug comp-sys-debug debug,compat
./usr/libdata/debug/usr/lib/o32/librt.so.1.1.debug comp-sys-debug debug,compat
./usr/libdata/debug/usr/lib/o32/librump.so.0.0.debug comp-rump-debug debug,compat
./usr/libdata/debug/usr/lib/o32/librumpclient.so.0.0.debug comp-rump-debug debug,compat
./usr/libdata/debug/usr/lib/o32/librumpcrypto.so.0.0.debug comp-obsolete obsolete,compat

View File

@ -1,4 +1,4 @@
# $NetBSD: md.amd64,v 1.158 2012/02/29 20:07:52 tron Exp $
# $NetBSD: md.amd64,v 1.159 2012/03/08 21:59:25 joerg Exp $
./usr/include/amd64 comp-c-include
./usr/include/amd64/ansi.h comp-c-include
./usr/include/amd64/aout_machdep.h comp-c-include
@ -1053,7 +1053,7 @@
./usr/libdata/debug/usr/lib/i386/libbluetooth.so.4.2.debug comp-compat-shlib compat,pic,debug
./usr/libdata/debug/usr/lib/i386/libbsdmalloc.so.0.0.debug comp-compat-shlib compat,pic,debug
./usr/libdata/debug/usr/lib/i386/libbz2.so.1.1.debug comp-compat-shlib compat,pic,debug
./usr/libdata/debug/usr/lib/i386/libc.so.12.182.debug comp-compat-shlib compat,pic,debug
./usr/libdata/debug/usr/lib/i386/libc.so.12.183.debug comp-compat-shlib compat,pic,debug
./usr/libdata/debug/usr/lib/i386/libcom_err.so.6.0.debug comp-compat-shlib compat,pic,kerberos,debug,obsolete
./usr/libdata/debug/usr/lib/i386/libcom_err.so.7.0.debug comp-compat-shlib compat,pic,kerberos,debug
./usr/libdata/debug/usr/lib/i386/libcrypt.so.1.0.debug comp-compat-shlib compat,pic,debug
@ -1127,7 +1127,7 @@
./usr/libdata/debug/usr/lib/i386/libposix.so.0.1.debug comp-compat-shlib compat,pic,debug
./usr/libdata/debug/usr/lib/i386/libppath.so.0.0.debug comp-compat-shlib compat,pic,debug
./usr/libdata/debug/usr/lib/i386/libprop.so.1.1.debug comp-compat-shlib compat,pic,debug
./usr/libdata/debug/usr/lib/i386/libpthread.so.1.0.debug comp-compat-shlib compat,pic,debug
./usr/libdata/debug/usr/lib/i386/libpthread.so.1.1.debug comp-compat-shlib compat,pic,debug
./usr/libdata/debug/usr/lib/i386/libpthread_dbg.so.2.0.debug comp-compat-shlib compat,pic,debug
./usr/libdata/debug/usr/lib/i386/libpuffs.so.2.0.debug comp-compat-shlib compat,pic,debug
./usr/libdata/debug/usr/lib/i386/libquota.so.1.0.debug comp-compat-shlib compat,pic,debug
@ -1137,7 +1137,7 @@
./usr/libdata/debug/usr/lib/i386/libroken.so.14.0.debug comp-compat-shlib compat,pic,kerberos,debug,obsolete
./usr/libdata/debug/usr/lib/i386/libroken.so.19.0.debug comp-compat-shlib compat,pic,kerberos,debug
./usr/libdata/debug/usr/lib/i386/librpcsvc.so.1.0.debug comp-compat-shlib compat,pic,debug
./usr/libdata/debug/usr/lib/i386/librt.so.1.0.debug comp-compat-shlib compat,pic,debug
./usr/libdata/debug/usr/lib/i386/librt.so.1.1.debug comp-compat-shlib compat,pic,debug
./usr/libdata/debug/usr/lib/i386/librump.so.0.0.debug comp-compat-shlib compat,pic,debug
./usr/libdata/debug/usr/lib/i386/librumpclient.so.0.0.debug comp-compat-shlib compat,pic,debug
./usr/libdata/debug/usr/lib/i386/librumpcrypto.so.0.0.debug comp-obsolete obsolete

View File

@ -1,4 +1,4 @@
# $NetBSD: md.sparc64,v 1.141 2012/02/29 20:07:52 tron Exp $
# $NetBSD: md.sparc64,v 1.142 2012/03/08 21:59:25 joerg Exp $
./usr/include/gcc-4.5/tgmath.h comp-c-include gcccmds,gcc=45
./usr/include/ieeefp.h comp-c-include
./usr/include/sparc comp-c-include
@ -896,7 +896,7 @@
./usr/libdata/debug/usr/lib/sparc/libbluetooth.so.4.2.debug comp-compat-shlib compat,pic,debug
./usr/libdata/debug/usr/lib/sparc/libbsdmalloc.so.0.0.debug comp-compat-shlib compat,pic,debug
./usr/libdata/debug/usr/lib/sparc/libbz2.so.1.1.debug comp-compat-shlib compat,pic,debug
./usr/libdata/debug/usr/lib/sparc/libc.so.12.182.debug comp-compat-shlib compat,pic,debug
./usr/libdata/debug/usr/lib/sparc/libc.so.12.183.debug comp-compat-shlib compat,pic,debug
./usr/libdata/debug/usr/lib/sparc/libcom_err.so.6.0.debug comp-compat-shlib compat,pic,kerberos,debug,obsolete
./usr/libdata/debug/usr/lib/sparc/libcom_err.so.7.0.debug comp-compat-shlib compat,pic,kerberos,debug
./usr/libdata/debug/usr/lib/sparc/libcrypt.so.1.0.debug comp-compat-shlib compat,pic,debug
@ -966,7 +966,7 @@
./usr/libdata/debug/usr/lib/sparc/libposix.so.0.1.debug comp-compat-shlib compat,pic,debug
./usr/libdata/debug/usr/lib/sparc/libppath.so.0.0.debug comp-compat-shlib compat,pic,debug
./usr/libdata/debug/usr/lib/sparc/libprop.so.1.1.debug comp-compat-shlib compat,pic,debug
./usr/libdata/debug/usr/lib/sparc/libpthread.so.1.0.debug comp-compat-shlib compat,pic,debug
./usr/libdata/debug/usr/lib/sparc/libpthread.so.1.1.debug comp-compat-shlib compat,pic,debug
./usr/libdata/debug/usr/lib/sparc/libpthread_dbg.so.2.0.debug comp-compat-shlib compat,pic,debug
./usr/libdata/debug/usr/lib/sparc/libpuffs.so.2.0.debug comp-compat-shlib compat,pic,debug
./usr/libdata/debug/usr/lib/sparc/libquota.so.1.0.debug comp-compat-shlib compat,pic,debug
@ -976,7 +976,7 @@
./usr/libdata/debug/usr/lib/sparc/libroken.so.14.0.debug comp-compat-shlib compat,pic,kerberos,debug,obsolete
./usr/libdata/debug/usr/lib/sparc/libroken.so.19.0.debug comp-compat-shlib compat,pic,kerberos,debug
./usr/libdata/debug/usr/lib/sparc/librpcsvc.so.1.0.debug comp-compat-shlib compat,pic,debug
./usr/libdata/debug/usr/lib/sparc/librt.so.1.0.debug comp-compat-shlib compat,pic,debug
./usr/libdata/debug/usr/lib/sparc/librt.so.1.1.debug comp-compat-shlib compat,pic,debug
./usr/libdata/debug/usr/lib/sparc/librump.so.0.0.debug comp-compat-shlib compat,pic,debug
./usr/libdata/debug/usr/lib/sparc/librumpclient.so.0.0.debug comp-compat-shlib compat,pic,debug
./usr/libdata/debug/usr/lib/sparc/librumpcrypto.so.0.0.debug comp-obsolete obsolete

View File

@ -1,4 +1,4 @@
# $NetBSD: mi,v 1.1744 2012/03/02 17:27:48 christos Exp $
# $NetBSD: mi,v 1.1745 2012/03/08 21:59:25 joerg Exp $
#
# Note: don't delete entries from here - mark them as "obsolete" instead.
#
@ -8801,6 +8801,7 @@
./usr/share/man/cat3/sem_init.0 comp-c-catman .cat
./usr/share/man/cat3/sem_open.0 comp-c-catman .cat
./usr/share/man/cat3/sem_post.0 comp-c-catman .cat
./usr/share/man/cat3/sem_timedwait.0 comp-c-catman .cat
./usr/share/man/cat3/sem_trywait.0 comp-c-catman .cat
./usr/share/man/cat3/sem_unlink.0 comp-c-catman .cat
./usr/share/man/cat3/sem_wait.0 comp-c-catman .cat
@ -15054,6 +15055,7 @@
./usr/share/man/html3/sem_init.html comp-c-htmlman html
./usr/share/man/html3/sem_open.html comp-c-htmlman html
./usr/share/man/html3/sem_post.html comp-c-htmlman html
./usr/share/man/html3/sem_timedwait.html comp-c-htmlman html
./usr/share/man/html3/sem_trywait.html comp-c-htmlman html
./usr/share/man/html3/sem_unlink.html comp-c-htmlman html
./usr/share/man/html3/sem_wait.html comp-c-htmlman html
@ -21315,6 +21317,7 @@
./usr/share/man/man3/sem_init.3 comp-c-man .man
./usr/share/man/man3/sem_open.3 comp-c-man .man
./usr/share/man/man3/sem_post.3 comp-c-man .man
./usr/share/man/man3/sem_timedwait.3 comp-c-man .man
./usr/share/man/man3/sem_trywait.3 comp-c-man .man
./usr/share/man/man3/sem_unlink.3 comp-c-man .man
./usr/share/man/man3/sem_wait.3 comp-c-man .man

View File

@ -1,4 +1,4 @@
# $NetBSD: shl.mi,v 1.212 2012/02/29 20:07:53 tron Exp $
# $NetBSD: shl.mi,v 1.213 2012/03/08 21:59:27 joerg Exp $
#
# Note: don't delete entries from here - mark them as "obsolete" instead.
#
@ -249,7 +249,7 @@
./usr/libdata/debug/usr/lib/libbluetooth.so.4.2.debug comp-sys-debug debug
./usr/libdata/debug/usr/lib/libbsdmalloc.so.0.0.debug comp-sys-debug debug
./usr/libdata/debug/usr/lib/libbz2.so.1.1.debug comp-sys-debug debug
./usr/libdata/debug/usr/lib/libc.so.12.182.debug comp-sys-debug debug
./usr/libdata/debug/usr/lib/libc.so.12.183.debug comp-sys-debug debug
./usr/libdata/debug/usr/lib/libcom_err.so.7.0.debug comp-krb5-debug kerberos,debug
./usr/libdata/debug/usr/lib/libcrypt.so.1.0.debug comp-sys-debug debug
./usr/libdata/debug/usr/lib/libcrypto.so.7.0.debug comp-crypto-debug crypto,debug
@ -320,7 +320,7 @@
./usr/libdata/debug/usr/lib/libposix.so.0.1.debug comp-sys-debug debug
./usr/libdata/debug/usr/lib/libppath.so.0.0.debug comp-sys-debug debug
./usr/libdata/debug/usr/lib/libprop.so.1.1.debug comp-sys-debug debug
./usr/libdata/debug/usr/lib/libpthread.so.1.0.debug comp-sys-debug debug
./usr/libdata/debug/usr/lib/libpthread.so.1.1.debug comp-sys-debug debug
./usr/libdata/debug/usr/lib/libpthread_dbg.so.2.0.debug comp-sys-debug debug
./usr/libdata/debug/usr/lib/libpuffs.so.2.0.debug comp-puffs-debug debug
./usr/libdata/debug/usr/lib/libquota.so.1.0.debug comp-sys-debug debug
@ -329,7 +329,7 @@
./usr/libdata/debug/usr/lib/libresolv.so.2.0.debug comp-net-debug debug
./usr/libdata/debug/usr/lib/libroken.so.19.0.debug comp-krb5-debug kerberos,debug
./usr/libdata/debug/usr/lib/librpcsvc.so.1.0.debug comp-net-debug debug
./usr/libdata/debug/usr/lib/librt.so.1.0.debug comp-sys-debug debug
./usr/libdata/debug/usr/lib/librt.so.1.1.debug comp-sys-debug debug
./usr/libdata/debug/usr/lib/librump.so.0.0.debug comp-rump-debug debug
./usr/libdata/debug/usr/lib/librumpclient.so.0.0.debug comp-rump-debug debug
./usr/libdata/debug/usr/lib/librumpdev.so.0.0.debug comp-rump-debug debug

View File

@ -1290,7 +1290,7 @@ static emul_syscall_descriptor netbsd_descriptors[] = {
/* 253 */ { 0, "_ksem_trywait" },
/* 254 */ { 0, "_ksem_getvalue" },
/* 255 */ { 0, "_ksem_destroy" },
{ 0, }, /* 256 */
/* 256 */ { 0, "_ksem_timedwait" },
/* 257 */ { 0, "mq_open" },
/* 258 */ { 0, "mq_close" },
/* 259 */ { 0, "mq_unlink" },

View File

@ -1288,7 +1288,7 @@ static emul_syscall_descriptor netbsd_descriptors[] = {
/* 253 */ { 0, "_ksem_trywait" },
/* 254 */ { 0, "_ksem_getvalue" },
/* 255 */ { 0, "_ksem_destroy" },
{ 0, }, /* 256 */
/* 256 */ { 0, "_ksem_timedwait" },
/* 257 */ { 0, "mq_open" },
/* 258 */ { 0, "mq_close" },
/* 259 */ { 0, "mq_unlink" },

View File

@ -1,4 +1,4 @@
/* $NetBSD: semaphore.h,v 1.3 2008/04/28 20:22:54 martin Exp $ */
/* $NetBSD: semaphore.h,v 1.4 2012/03/08 21:59:28 joerg Exp $ */
/*-
* Copyright (c) 2003 The NetBSD Foundation, Inc.
@ -40,7 +40,7 @@ typedef struct _sem_st *sem_t;
#define SEM_FAILED ((sem_t *)0)
#define SEM_VALUE_MAX (~0U)
#include <sys/cdefs.h>
#include <sys/time.h>
__BEGIN_DECLS
int sem_close(sem_t *);
@ -48,6 +48,7 @@ int sem_destroy(sem_t *);
int sem_getvalue(sem_t * __restrict, int * __restrict);
int sem_init(sem_t *, int, unsigned int);
int sem_post(sem_t *);
int sem_timedwait(sem_t *, const struct timespec * __restrict);
int sem_trywait(sem_t *);
int sem_unlink(const char *);
int sem_wait(sem_t *);

View File

@ -1,4 +1,4 @@
# $NetBSD: shlib_version,v 1.230 2012/02/27 12:26:21 joerg Exp $
# $NetBSD: shlib_version,v 1.231 2012/03/08 21:59:28 joerg Exp $
# Remember to update distrib/sets/lists/base/shl.* when changing
#
# things we wish to do on next major version bump:
@ -31,4 +31,4 @@
# - remove gets(); it is finally dead in c11.
# - make __cerror (spelled CERROR) hidden again
major=12
minor=182
minor=183

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile.inc,v 1.213 2012/02/19 19:18:40 matt Exp $
# $NetBSD: Makefile.inc,v 1.214 2012/03/08 21:59:28 joerg Exp $
# @(#)Makefile.inc 8.3 (Berkeley) 10/24/94
# sys sources
@ -98,8 +98,8 @@ ASM= access.S acct.S \
ioctl.S \
kqueue.S kqueue1.S ktrace.S \
_ksem_close.S _ksem_destroy.S _ksem_getvalue.S _ksem_init.S \
_ksem_post.S _ksem_trywait.S _ksem_unlink.S _ksem_wait.S \
_ksem_open.S \
_ksem_post.S _ksem_timedwait.S _ksem_trywait.S _ksem_unlink.S \
_ksem_wait.S _ksem_open.S \
lchflags.S lchmod.S lchown.S lfs_bmapv.S lfs_markv.S lfs_segclean.S \
__lfs_segwait50.S link.S linkat.S listen.S __lstat50.S \
__lutimes50.S _lwp_create.S _lwp_exit.S _lwp_kill.S \

View File

@ -1,4 +1,4 @@
/* $NetBSD: sem.c,v 1.22 2012/03/07 23:31:44 joerg Exp $ */
/* $NetBSD: sem.c,v 1.23 2012/03/08 21:59:28 joerg Exp $ */
/*-
* Copyright (c) 2003, 2006, 2007 The NetBSD Foundation, Inc.
@ -59,7 +59,7 @@
*/
#include <sys/cdefs.h>
__RCSID("$NetBSD: sem.c,v 1.22 2012/03/07 23:31:44 joerg Exp $");
__RCSID("$NetBSD: sem.c,v 1.23 2012/03/08 21:59:28 joerg Exp $");
#include <sys/types.h>
#include <sys/ksem.h>
@ -260,6 +260,20 @@ sem_wait(sem_t *sem)
return (_ksem_wait((*sem)->ksem_semid));
}
int
sem_timedwait(sem_t *sem, const struct timespec * __restrict abstime)
{
#ifdef ERRORCHECK
if (sem == NULL || *sem == NULL || (*sem)->ksem_magic != KSEM_MAGIC) {
errno = EINVAL;
return (-1);
}
#endif
return (_ksem_timedwait((*sem)->ksem_semid, abstime));
}
int
sem_trywait(sem_t *sem)
{

View File

@ -1,4 +1,4 @@
# $NetBSD: shlib_version,v 1.14 2009/01/11 02:46:48 christos Exp $
# $NetBSD: shlib_version,v 1.15 2012/03/08 21:59:28 joerg Exp $
# Remember to update distrib/sets/lists/base/shl.* when changing
#
# Things to do when bumping major version:
@ -16,4 +16,4 @@
# without compat_netbsd32 shims??
#
major=1
minor=0
minor=1

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.14 2011/10/27 18:45:44 christos Exp $
# $NetBSD: Makefile,v 1.15 2012/03/08 21:59:28 joerg Exp $
#
.include <bsd.own.mk>
@ -23,6 +23,7 @@ MLINKS+= mq_send.3 mq_timedsend.3
MLINKS+= sem_open.3 sem_close.3
MLINKS+= sem_open.3 sem_unlink.3
MLINKS+= sem_wait.3 sem_timedwait.3
MLINKS+= sem_wait.3 sem_trywait.3
MLINKS+= pset.3 pset_create.3

View File

@ -1,4 +1,4 @@
/* $NetBSD: sem.c,v 1.5 2008/11/14 15:49:20 ad Exp $ */
/* $NetBSD: sem.c,v 1.6 2012/03/08 21:59:29 joerg Exp $ */
/*-
* Copyright (c) 2003 The NetBSD Foundation, Inc.
@ -59,7 +59,7 @@
*/
#include <sys/cdefs.h>
__RCSID("$NetBSD: sem.c,v 1.5 2008/11/14 15:49:20 ad Exp $");
__RCSID("$NetBSD: sem.c,v 1.6 2012/03/08 21:59:29 joerg Exp $");
/*
* If an application is linked against both librt and libpthread, the
@ -72,6 +72,7 @@ __RCSID("$NetBSD: sem.c,v 1.5 2008/11/14 15:49:20 ad Exp $");
#define sem_close _librt_sem_close
#define sem_unlink _librt_sem_unlink
#define sem_wait _librt_sem_wait
#define sem_timedwait _librt_sem_timedwait
#define sem_trywait _librt_sem_trywait
#define sem_post _librt_sem_post
#define sem_getvalue _librt_sem_getvalue
@ -108,6 +109,7 @@ __weak_alias(sem_open,_librt_sem_open)
__weak_alias(sem_close,_librt_sem_close)
__weak_alias(sem_unlink,_librt_sem_unlink)
__weak_alias(sem_wait,_librt_sem_wait)
__weak_alias(sem_timedwait,_librt_sem_timedwait)
__weak_alias(sem_trywait,_librt_sem_trywait)
__weak_alias(sem_post,_librt_sem_post)
__weak_alias(sem_getvalue,_librt_sem_getvalue)
@ -277,6 +279,20 @@ sem_wait(sem_t *sem)
return (_ksem_wait((*sem)->ksem_semid));
}
int
sem_timedwait(sem_t *sem, const struct timespec * __restrict abstime)
{
#ifdef ERRORCHECK
if (sem == NULL || *sem == NULL || (*sem)->ksem_magic != KSEM_MAGIC) {
errno = EINVAL;
return (-1);
}
#endif
return (_ksem_timedwait((*sem)->ksem_semid, abstime));
}
int
sem_trywait(sem_t *sem)
{

View File

@ -1,4 +1,4 @@
.\" $NetBSD: sem_getvalue.3,v 1.2 2005/03/21 21:55:08 kleink Exp $
.\" $NetBSD: sem_getvalue.3,v 1.3 2012/03/08 21:59:29 joerg Exp $
.\"
.\" Copyright (C) 2000 Jason Evans <jasone@FreeBSD.org>.
.\" All rights reserved.
@ -27,7 +27,7 @@
.\" OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
.\" EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd January 22, 2003
.Dd February 29, 2012
.Dt SEM_GETVALUE 3
.Os
.Sh NAME
@ -61,6 +61,7 @@ points to an invalid semaphore.
.El
.Sh SEE ALSO
.Xr sem_post 3 ,
.Xr sem_timedwait 3
.Xr sem_trywait 3 ,
.Xr sem_wait 3
.Sh STANDARDS

View File

@ -1,4 +1,4 @@
.\" $NetBSD: sem_init.3,v 1.1 2003/01/24 01:52:44 thorpej Exp $
.\" $NetBSD: sem_init.3,v 1.2 2012/03/08 21:59:29 joerg Exp $
.\"
.\" Copyright (C) 2000 Jason Evans <jasone@FreeBSD.org>.
.\" All rights reserved.
@ -27,7 +27,7 @@
.\" OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
.\" EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd January 22, 2003
.Dd February 29, 2012
.Dt SEM_INIT 3
.Os
.Sh NAME
@ -55,11 +55,12 @@ Following a successful call to
.Fn sem_init ,
.Fa sem
can be used as an argument in subsequent calls to
.Fa sem_wait ,
.Fa sem_trywait ,
.Fa sem_post ,
.Fn sem_wait ,
.Fn sem_timedwait ,
.Fn sem_trywait ,
.Fn sem_post ,
and
.Fa sem_destroy .
.Fn sem_destroy .
.Fa sem
is no longer valid after a successful call to
.Fa sem_destroy .
@ -80,6 +81,7 @@ Unable to initialize a shared semaphore.
.Sh SEE ALSO
.Xr sem_destroy 3 ,
.Xr sem_post 3 ,
.Xr sem_timedwait 3 ,
.Xr sem_trywait 3 ,
.Xr sem_wait 3
.Sh STANDARDS

View File

@ -1,4 +1,4 @@
.\" $NetBSD: sem_open.3,v 1.4 2005/05/16 00:45:24 peter Exp $
.\" $NetBSD: sem_open.3,v 1.5 2012/03/08 21:59:29 joerg Exp $
.\"
.\" Copyright (C) 2000 Jason Evans <jasone@FreeBSD.org>.
.\" All rights reserved.
@ -29,7 +29,7 @@
.\"
.\" From: FreeBSD: src/lib/libc/gen/sem_open.3,v 1.12 2004/07/02 16:45:56 ru
.\"
.Dd January 21, 2005
.Dd February 29, 2012
.Dt SEM_OPEN 3
.Os
.Sh NAME
@ -54,8 +54,9 @@ function creates or opens the named semaphore specified by
.Fa name .
The returned semaphore may be used in subsequent calls to
.Xr sem_getvalue 3 ,
.Xr sem_wait 3 ,
.Xr sem_timedwait 3 ,
.Xr sem_trywait 3 ,
.Xr sem_wait 3 ,
.Xr sem_post 3 ,
and
.Fn sem_close .

View File

@ -1,4 +1,4 @@
.\" $NetBSD: sem_post.3,v 1.1 2003/01/24 01:52:44 thorpej Exp $
.\" $NetBSD: sem_post.3,v 1.2 2012/03/08 21:59:29 joerg Exp $
.\"
.\" Copyright (C) 2000 Jason Evans <jasone@FreeBSD.org>.
.\" All rights reserved.
@ -27,7 +27,7 @@
.\" OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
.\" EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd January 22, 2003
.Dd February 29, 2012
.Dt SEM_POST 3
.Os
.Sh NAME
@ -48,7 +48,9 @@ If there are threads blocked on the semaphore when
.Fn sem_post
is called, then the highest priority thread that has been blocked the longest on
the semaphore will be allowed to return from
.Fn sem_wait .
.Fn sem_wait
or
.Fn sem_timedwait.
.Pp
.Fn sem_post
is signal-reentrant and may be called within signal handlers.
@ -63,6 +65,7 @@ will fail if:
points to an invalid semaphore.
.El
.Sh SEE ALSO
.Xr sem_timedwait 3 ,
.Xr sem_trywait 3 ,
.Xr sem_wait 3
.Sh STANDARDS

View File

@ -1,4 +1,4 @@
.\" $NetBSD: sem_wait.3,v 1.1 2003/01/24 01:52:45 thorpej Exp $
.\" $NetBSD: sem_wait.3,v 1.2 2012/03/08 21:59:29 joerg Exp $
.\"
.\" Copyright (C) 2000 Jason Evans <jasone@FreeBSD.org>.
.\" All rights reserved.
@ -27,7 +27,7 @@
.\" OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
.\" EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd January 22, 2003
.Dd February 29, 2012
.Dt SEM_WAIT 3
.Os
.Sh NAME
@ -41,6 +41,8 @@
.Ft int
.Fn sem_wait "sem_t *sem"
.Ft int
.Fn sem_wait "sem_t *sem" "const struct timespec * restrict abstime"
.Ft int
.Fn sem_trywait "sem_t *sem"
.Sh DESCRIPTION
The
@ -52,6 +54,14 @@ but blocks if the value of
is zero, until the value is non-zero and the value can be decremented.
.Pp
The
.Fn sem_timedwait
function performs the same action, but will not wait beyond
.Fa abstime
for the value of
.Fa sem
to be non-zero.
.Pp
The
.Fn sem_trywait
function decrements (locks) the semaphore pointed to by
.Fa sem
@ -60,7 +70,8 @@ Otherwise, the semaphore is not decremented and an error is returned.
.Sh RETURN VALUES
.Rv -std sem_wait
.Sh ERRORS
.Fn sem_wait
.Fn sem_wait ,
.Fn sem_timedwait
and
.Fn sem_trywait
will fail if:
@ -77,6 +88,15 @@ will fail if:
.It Bq Er EAGAIN
The semaphore value was zero, and thus could not be decremented.
.El
.Pp
.Fn sem_timedwait
will also fail if:
.Bl -tag -width Er
.It Bq Er ETIMEDOUT
The semaphore value was zero and
.Fa abstime
was reached.
.El
.Sh SEE ALSO
.Xr sem_post 3
.Sh STANDARDS

View File

@ -1,5 +1,5 @@
# $NetBSD: shlib_version,v 1.2 2009/01/11 03:07:49 christos Exp $
# $NetBSD: shlib_version,v 1.3 2012/03/08 21:59:29 joerg Exp $
# Remember to update distrib/sets/lists/base/shl.* when changing
#
major=1
minor=0
minor=1

View File

@ -1,4 +1,4 @@
/* $NetBSD: netbsd32_sem.c,v 1.8 2008/11/14 15:49:20 ad Exp $ */
/* $NetBSD: netbsd32_sem.c,v 1.9 2012/03/08 21:59:29 joerg Exp $ */
/*
* Copyright (c) 2006 The NetBSD Foundation.
@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: netbsd32_sem.c,v 1.8 2008/11/14 15:49:20 ad Exp $");
__KERNEL_RCSID(0, "$NetBSD: netbsd32_sem.c,v 1.9 2012/03/08 21:59:29 joerg Exp $");
#ifdef _KERNEL_OPT
#include "opt_posix.h"
@ -130,10 +130,8 @@ netbsd32__ksem_wait(struct lwp *l, const struct netbsd32__ksem_wait_args *uap, r
/* {
syscallarg(netbsd32_intptr_t) id;
} */
struct sys__ksem_wait_args ua;
NETBSD32TOX_UAP(id, intptr_t);
return sys__ksem_wait(l, &ua, retval);
return do_ksem_wait(l, SCARG(uap, id), false, NULL);
}
int
@ -142,10 +140,37 @@ netbsd32__ksem_trywait(struct lwp *l, const struct netbsd32__ksem_trywait_args *
/* {
syscallarg(netbsd32_intptr_t) id;
} */
struct sys__ksem_trywait_args ua;
NETBSD32TOX_UAP(id, intptr_t);
return sys__ksem_trywait(l, &ua, retval);
return do_ksem_wait(l, SCARG(uap, id), true, NULL);
}
int
netbsd32__ksem_timedwait(struct lwp *l, const struct netbsd32__ksem_timedwait_args *uap,
register_t *retval)
{
/* {
intptr_t id;
const netbsd32_timespecp_t abstime;
} */
struct netbsd32_timespec ts32;
struct timespec ts;
intptr_t id;
int error;
id = SCARG(uap, id);
error = copyin(SCARG_P32(uap, abstime), &ts32, sizeof(ts32));
if (error != 0)
return error;
netbsd32_to_timespec(&ts32, &ts);
if (ts.tv_sec < 0 || ts.tv_nsec < 0 || ts.tv_nsec >= 1000000000)
return EINVAL;
error = do_ksem_wait(l, id, false, &ts);
if (error == EWOULDBLOCK)
error = ETIMEDOUT;
return error;
}
int

View File

@ -1,10 +1,10 @@
/* $NetBSD: netbsd32_syscall.h,v 1.100 2012/02/19 21:06:41 rmind Exp $ */
/* $NetBSD: netbsd32_syscall.h,v 1.101 2012/03/08 21:59:29 joerg Exp $ */
/*
* System call numbers.
*
* DO NOT EDIT-- this file is automatically generated.
* created from NetBSD: syscalls.master,v 1.91 2012/02/01 05:40:01 dholland Exp
* created from NetBSD: syscalls.master,v 1.93 2012/03/08 21:55:45 joerg Exp
*/
#ifndef _NETBSD32_SYS_SYSCALL_H_
@ -703,6 +703,9 @@
/* syscall: "netbsd32__ksem_destroy" ret: "int" args: "netbsd32_intptr_t" */
#define NETBSD32_SYS_netbsd32__ksem_destroy 255
/* syscall: "netbsd32__ksem_timedwait" ret: "int" args: "intptr_t" "const netbsd32_timespecp_t" */
#define NETBSD32_SYS_netbsd32__ksem_timedwait 256
#else
/* 247 is excluded sys__ksem_init */
/* 248 is excluded sys__ksem_open */
@ -713,6 +716,7 @@
/* 253 is excluded sys__ksem_trywait */
/* 254 is excluded sys__ksem_getvalue */
/* 255 is excluded sys__ksem_destroy */
/* 256 is excluded sys__ksem_timedwait */
#endif
/* syscall: "netbsd32___posix_rename" ret: "int" args: "netbsd32_charp" "netbsd32_charp" */
#define NETBSD32_SYS_netbsd32___posix_rename 270

View File

@ -1,10 +1,10 @@
/* $NetBSD: netbsd32_syscallargs.h,v 1.100 2012/02/19 21:06:42 rmind Exp $ */
/* $NetBSD: netbsd32_syscallargs.h,v 1.101 2012/03/08 21:59:29 joerg Exp $ */
/*
* System call argument lists.
*
* DO NOT EDIT-- this file is automatically generated.
* created from NetBSD: syscalls.master,v 1.91 2012/02/01 05:40:01 dholland Exp
* created from NetBSD: syscalls.master,v 1.93 2012/03/08 21:55:45 joerg Exp
*/
#ifndef _NETBSD32_SYS_SYSCALLARGS_H_
@ -1301,6 +1301,12 @@ struct netbsd32__ksem_destroy_args {
syscallarg(netbsd32_intptr_t) id;
};
check_syscall_args(netbsd32__ksem_destroy)
struct netbsd32__ksem_timedwait_args {
syscallarg(intptr_t) id;
syscallarg(const netbsd32_timespecp_t) abstime;
};
check_syscall_args(netbsd32__ksem_timedwait)
#else
#endif
@ -2887,6 +2893,8 @@ int netbsd32__ksem_getvalue(struct lwp *, const struct netbsd32__ksem_getvalue_a
int netbsd32__ksem_destroy(struct lwp *, const struct netbsd32__ksem_destroy_args *, register_t *);
int netbsd32__ksem_timedwait(struct lwp *, const struct netbsd32__ksem_timedwait_args *, register_t *);
#else
#endif
int netbsd32___posix_rename(struct lwp *, const struct netbsd32___posix_rename_args *, register_t *);

View File

@ -1,14 +1,14 @@
/* $NetBSD: netbsd32_syscalls.c,v 1.99 2012/02/19 21:06:42 rmind Exp $ */
/* $NetBSD: netbsd32_syscalls.c,v 1.100 2012/03/08 21:59:29 joerg Exp $ */
/*
* System call names.
*
* DO NOT EDIT-- this file is automatically generated.
* created from NetBSD: syscalls.master,v 1.91 2012/02/01 05:40:01 dholland Exp
* created from NetBSD: syscalls.master,v 1.93 2012/03/08 21:55:45 joerg Exp
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: netbsd32_syscalls.c,v 1.99 2012/02/19 21:06:42 rmind Exp $");
__KERNEL_RCSID(0, "$NetBSD: netbsd32_syscalls.c,v 1.100 2012/03/08 21:59:29 joerg Exp $");
#if defined(_KERNEL_OPT)
#if defined(_KERNEL_OPT)
@ -323,7 +323,7 @@ const char *const netbsd32_syscallnames[] = {
/* 253 */ "netbsd32__ksem_trywait",
/* 254 */ "netbsd32__ksem_getvalue",
/* 255 */ "netbsd32__ksem_destroy",
/* 256 */ "#256 (unimplemented sys__ksem_timedwait)",
/* 256 */ "netbsd32__ksem_timedwait",
#else
/* 247 */ "#247 (excluded sys__ksem_init)",
/* 248 */ "#248 (excluded sys__ksem_open)",
@ -334,7 +334,7 @@ const char *const netbsd32_syscallnames[] = {
/* 253 */ "#253 (excluded sys__ksem_trywait)",
/* 254 */ "#254 (excluded sys__ksem_getvalue)",
/* 255 */ "#255 (excluded sys__ksem_destroy)",
/* 256 */ "#256 (unimplemented sys__ksem_timedwait)",
/* 256 */ "#256 (excluded sys__ksem_timedwait)",
#endif
/* 257 */ "#257 (unimplemented)",
/* 258 */ "#258 (unimplemented)",

View File

@ -1,14 +1,14 @@
/* $NetBSD: netbsd32_sysent.c,v 1.99 2012/02/19 21:06:42 rmind Exp $ */
/* $NetBSD: netbsd32_sysent.c,v 1.100 2012/03/08 21:59:29 joerg Exp $ */
/*
* System call switch table.
*
* DO NOT EDIT-- this file is automatically generated.
* created from NetBSD: syscalls.master,v 1.91 2012/02/01 05:40:01 dholland Exp
* created from NetBSD: syscalls.master,v 1.93 2012/03/08 21:55:45 joerg Exp
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: netbsd32_sysent.c,v 1.99 2012/02/19 21:06:42 rmind Exp $");
__KERNEL_RCSID(0, "$NetBSD: netbsd32_sysent.c,v 1.100 2012/03/08 21:59:29 joerg Exp $");
#if defined(_KERNEL_OPT)
#include "opt_compat_netbsd.h"
@ -676,8 +676,8 @@ struct sysent netbsd32_sysent[] = {
(sy_call_t *)netbsd32__ksem_getvalue },/* 254 = netbsd32__ksem_getvalue */
{ ns(struct netbsd32__ksem_destroy_args), 0,
(sy_call_t *)netbsd32__ksem_destroy },/* 255 = netbsd32__ksem_destroy */
{ 0, 0, 0,
sys_nosys }, /* 256 = unimplemented sys__ksem_timedwait */
{ ns(struct netbsd32__ksem_timedwait_args), 0,
(sy_call_t *)netbsd32__ksem_timedwait },/* 256 = netbsd32__ksem_timedwait */
#else
{ 0, 0, 0,
sys_nosys }, /* 247 = excluded sys__ksem_init */
@ -698,7 +698,7 @@ struct sysent netbsd32_sysent[] = {
{ 0, 0, 0,
sys_nosys }, /* 255 = excluded sys__ksem_destroy */
{ 0, 0, 0,
sys_nosys }, /* 256 = unimplemented sys__ksem_timedwait */
sys_nosys }, /* 256 = excluded sys__ksem_timedwait */
#endif
{ 0, 0, 0,
sys_nosys }, /* 257 = unimplemented */

View File

@ -1,14 +1,14 @@
/* $NetBSD: init_sysent.c,v 1.263 2012/02/19 17:50:50 matt Exp $ */
/* $NetBSD: init_sysent.c,v 1.264 2012/03/08 21:59:30 joerg Exp $ */
/*
* System call switch table.
*
* DO NOT EDIT-- this file is automatically generated.
* created from NetBSD: syscalls.master,v 1.257 2012/02/19 17:50:28 matt Exp
* created from NetBSD: syscalls.master,v 1.258 2012/03/08 21:55:45 joerg Exp
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: init_sysent.c,v 1.263 2012/02/19 17:50:50 matt Exp $");
__KERNEL_RCSID(0, "$NetBSD: init_sysent.c,v 1.264 2012/03/08 21:59:30 joerg Exp $");
#include "opt_modular.h"
#include "opt_ntp.h"
@ -675,8 +675,8 @@ struct sysent sysent[] = {
(sy_call_t *)sys_nomodule }, /* 254 = _ksem_getvalue */
{ ns(struct sys__ksem_destroy_args), 0,
(sy_call_t *)sys_nomodule }, /* 255 = _ksem_destroy */
{ 0, 0, 0,
sys_nosys }, /* 256 = unimplemented sys__ksem_timedwait */
{ ns(struct sys__ksem_timedwait_args), 0,
(sy_call_t *)sys_nomodule }, /* 256 = _ksem_timedwait */
{ ns(struct sys_mq_open_args), 0,
(sy_call_t *)sys_nomodule }, /* 257 = mq_open */
{ ns(struct sys_mq_close_args), 0,

View File

@ -1,4 +1,4 @@
/* $NetBSD: kern_syscall.c,v 1.5 2010/08/21 13:19:39 pgoyette Exp $ */
/* $NetBSD: kern_syscall.c,v 1.6 2012/03/08 21:59:30 joerg Exp $ */
/*-
* Copyright (c) 2008 The NetBSD Foundation, Inc.
@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: kern_syscall.c,v 1.5 2010/08/21 13:19:39 pgoyette Exp $");
__KERNEL_RCSID(0, "$NetBSD: kern_syscall.c,v 1.6 2012/03/08 21:59:30 joerg Exp $");
#include "opt_modular.h"
@ -192,6 +192,7 @@ sys_nomodule(struct lwp *l, const void *v, register_t *retval)
{ SYS__ksem_trywait, "ksem" },
{ SYS__ksem_getvalue, "ksem" },
{ SYS__ksem_destroy, "ksem" },
{ SYS__ksem_timedwait, "ksem" },
{ SYS_nfssvc, "nfsserver" },
};
const struct sysent *sy;

View File

@ -1,14 +1,14 @@
/* $NetBSD: syscalls.c,v 1.254 2012/02/19 17:50:50 matt Exp $ */
/* $NetBSD: syscalls.c,v 1.255 2012/03/08 21:59:30 joerg Exp $ */
/*
* System call names.
*
* DO NOT EDIT-- this file is automatically generated.
* created from NetBSD: syscalls.master,v 1.257 2012/02/19 17:50:28 matt Exp
* created from NetBSD: syscalls.master,v 1.258 2012/03/08 21:55:45 joerg Exp
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: syscalls.c,v 1.254 2012/02/19 17:50:50 matt Exp $");
__KERNEL_RCSID(0, "$NetBSD: syscalls.c,v 1.255 2012/03/08 21:59:30 joerg Exp $");
#if defined(_KERNEL_OPT)
#include "opt_modular.h"
@ -317,7 +317,7 @@ const char *const syscallnames[] = {
/* 253 */ "_ksem_trywait",
/* 254 */ "_ksem_getvalue",
/* 255 */ "_ksem_destroy",
/* 256 */ "#256 (unimplemented sys__ksem_timedwait)",
/* 256 */ "_ksem_timedwait",
/* 257 */ "mq_open",
/* 258 */ "mq_close",
/* 259 */ "mq_unlink",

View File

@ -1,4 +1,4 @@
/* $NetBSD: uipc_sem.c,v 1.35 2011/04/17 20:37:43 rmind Exp $ */
/* $NetBSD: uipc_sem.c,v 1.36 2012/03/08 21:59:30 joerg Exp $ */
/*-
* Copyright (c) 2011 The NetBSD Foundation, Inc.
@ -60,7 +60,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: uipc_sem.c,v 1.35 2011/04/17 20:37:43 rmind Exp $");
__KERNEL_RCSID(0, "$NetBSD: uipc_sem.c,v 1.36 2012/03/08 21:59:30 joerg Exp $");
#include <sys/param.h>
#include <sys/kernel.h>
@ -135,6 +135,7 @@ static const struct syscall_package ksem_syscalls[] = {
{ SYS__ksem_trywait, 0, (sy_call_t *)sys__ksem_trywait },
{ SYS__ksem_getvalue, 0, (sy_call_t *)sys__ksem_getvalue },
{ SYS__ksem_destroy, 0, (sy_call_t *)sys__ksem_destroy },
{ SYS__ksem_timedwait, 0, (sy_call_t *)sys__ksem_timedwait },
{ 0, 0, NULL },
};
@ -612,10 +613,10 @@ out:
return error;
}
static int
ksem_wait(lwp_t *l, intptr_t id, bool try)
int
do_ksem_wait(lwp_t *l, intptr_t id, bool try, struct timespec *abstime)
{
int fd = (int)id, error;
int fd = (int)id, error, timeo;
ksem_t *ks;
error = ksem_get(fd, &ks);
@ -625,7 +626,15 @@ ksem_wait(lwp_t *l, intptr_t id, bool try)
KASSERT(mutex_owned(&ks->ks_lock));
while (ks->ks_value == 0) {
ks->ks_waiters++;
error = try ? EAGAIN : cv_wait_sig(&ks->ks_cv, &ks->ks_lock);
if (!try && abstime != NULL) {
error = abstimeout2timo(abstime, &timeo);
if (error != 0)
goto out;
} else {
timeo = 0;
}
error = try ? EAGAIN : cv_timedwait_sig(&ks->ks_cv,
&ks->ks_lock, timeo);
ks->ks_waiters--;
if (error)
goto out;
@ -645,7 +654,31 @@ sys__ksem_wait(struct lwp *l, const struct sys__ksem_wait_args *uap,
intptr_t id;
} */
return ksem_wait(l, SCARG(uap, id), false);
return do_ksem_wait(l, SCARG(uap, id), false, NULL);
}
int
sys__ksem_timedwait(struct lwp *l, const struct sys__ksem_timedwait_args *uap,
register_t *retval)
{
/* {
intptr_t id;
const struct timespec *abstime;
} */
struct timespec ts;
int error;
error = copyin(SCARG(uap, abstime), &ts, sizeof(ts));
if (error != 0)
return error;
if (ts.tv_sec < 0 || ts.tv_nsec < 0 || ts.tv_nsec >= 1000000000)
return EINVAL;
error = do_ksem_wait(l, SCARG(uap, id), false, &ts);
if (error == EWOULDBLOCK)
error = ETIMEDOUT;
return error;
}
int
@ -656,7 +689,7 @@ sys__ksem_trywait(struct lwp *l, const struct sys__ksem_trywait_args *uap,
intptr_t id;
} */
return ksem_wait(l, SCARG(uap, id), true);
return do_ksem_wait(l, SCARG(uap, id), true, NULL);
}
int

File diff suppressed because it is too large Load Diff

View File

@ -1,14 +1,14 @@
/* $NetBSD: rump_syscalls.c,v 1.77 2012/02/11 23:18:14 martin Exp $ */
/* $NetBSD: rump_syscalls.c,v 1.78 2012/03/08 21:59:31 joerg Exp $ */
/*
* System call vector and marshalling for rump.
*
* DO NOT EDIT-- this file is automatically generated.
* created from NetBSD: syscalls.master,v 1.254 2012/02/11 23:16:17 martin Exp
* created from NetBSD: syscalls.master,v 1.258 2012/03/08 21:55:45 joerg Exp
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: rump_syscalls.c,v 1.77 2012/02/11 23:18:14 martin Exp $");
__KERNEL_RCSID(0, "$NetBSD: rump_syscalls.c,v 1.78 2012/03/08 21:59:31 joerg Exp $");
#include <sys/param.h>
#include <sys/fstypes.h>
@ -2334,6 +2334,30 @@ rump___sysimpl__ksem_destroy(intptr_t id)
}
rsys_alias(sys__ksem_destroy,rump_enosys)
int rump___sysimpl__ksem_timedwait(intptr_t, const struct timespec *);
int
rump___sysimpl__ksem_timedwait(intptr_t id, const struct timespec * abstime)
{
register_t retval[2] = {0, 0};
int error = 0;
int rv = -1;
struct sys__ksem_timedwait_args callarg;
SPARG(&callarg, id) = id;
SPARG(&callarg, abstime) = abstime;
error = rsys_syscall(SYS__ksem_timedwait, &callarg, sizeof(callarg), retval);
rsys_seterrno(error);
if (error == 0) {
if (sizeof(int) > sizeof(register_t))
rv = *(int *)retval;
else
rv = *retval;
}
return rv;
}
rsys_alias(sys__ksem_timedwait,rump_enosys)
int rump___sysimpl_lchmod(const char *, mode_t);
int
rump___sysimpl_lchmod(const char * path, mode_t mode)
@ -5120,8 +5144,8 @@ struct sysent rump_sysent[] = {
(sy_call_t *)sys_nomodule }, /* 254 = _ksem_getvalue */
{ ns(struct sys__ksem_destroy_args), 0,
(sy_call_t *)sys_nomodule }, /* 255 = _ksem_destroy */
{ 0, 0, SYCALL_NOSYS,
(sy_call_t *)rump_enosys }, /* 256 = unimplemented sys__ksem_timedwait */
{ ns(struct sys__ksem_timedwait_args), 0,
(sy_call_t *)sys_nomodule }, /* 256 = _ksem_timedwait */
{ 0, 0, 0,
(sy_call_t *)sys_nomodule }, /* 257 = mq_open */
{ 0, 0, 0,

View File

@ -1,4 +1,4 @@
/* $NetBSD: ksem.h,v 1.11 2008/11/14 15:49:21 ad Exp $ */
/* $NetBSD: ksem.h,v 1.12 2012/03/08 21:59:31 joerg Exp $ */
/*
* Copyright (c) 2002 Alfred Perlstein <alfred@FreeBSD.org>
@ -31,12 +31,15 @@
#include <sys/cdefs.h>
struct timespec;
#ifdef _KERNEL
#define KSEM_MAX 128
int do_ksem_init(struct lwp *, unsigned int, intptr_t *, copyout_t);
int do_ksem_open(struct lwp *, const char *, int, mode_t, unsigned int,
intptr_t *, copyout_t);
int do_ksem_wait(struct lwp *, intptr_t, bool, struct timespec *);
extern int posix_semaphores;
extern int ksem_max;
@ -50,6 +53,7 @@ int _ksem_getvalue(intptr_t, int *);
int _ksem_init(unsigned int, intptr_t *);
int _ksem_open(const char *, int, mode_t, unsigned int, intptr_t *);
int _ksem_post(intptr_t);
int _ksem_timedwait(intptr_t, const struct timespec * __restrict);
int _ksem_trywait(intptr_t);
int _ksem_unlink(const char *);
int _ksem_wait(intptr_t);

View File

@ -1,10 +1,10 @@
/* $NetBSD: syscall.h,v 1.250 2012/02/19 17:50:50 matt Exp $ */
/* $NetBSD: syscall.h,v 1.251 2012/03/08 21:59:31 joerg Exp $ */
/*
* System call numbers.
*
* DO NOT EDIT-- this file is automatically generated.
* created from NetBSD: syscalls.master,v 1.257 2012/02/19 17:50:28 matt Exp
* created from NetBSD: syscalls.master,v 1.258 2012/03/08 21:55:45 joerg Exp
*/
#ifndef _SYS_SYSCALL_H_
@ -718,6 +718,9 @@
/* syscall: "_ksem_destroy" ret: "int" args: "intptr_t" */
#define SYS__ksem_destroy 255
/* syscall: "_ksem_timedwait" ret: "int" args: "intptr_t" "const struct timespec *" */
#define SYS__ksem_timedwait 256
/* syscall: "mq_open" ret: "mqd_t" args: "const char *" "int" "mode_t" "struct mq_attr *" */
#define SYS_mq_open 257

View File

@ -1,10 +1,10 @@
/* $NetBSD: syscallargs.h,v 1.233 2012/02/19 17:50:50 matt Exp $ */
/* $NetBSD: syscallargs.h,v 1.234 2012/03/08 21:59:32 joerg Exp $ */
/*
* System call argument lists.
*
* DO NOT EDIT-- this file is automatically generated.
* created from NetBSD: syscalls.master,v 1.257 2012/02/19 17:50:28 matt Exp
* created from NetBSD: syscalls.master,v 1.258 2012/03/08 21:55:45 joerg Exp
*/
#ifndef _SYS_SYSCALLARGS_H_
@ -1349,6 +1349,12 @@ struct sys__ksem_destroy_args {
};
check_syscall_args(sys__ksem_destroy)
struct sys__ksem_timedwait_args {
syscallarg(intptr_t) id;
syscallarg(const struct timespec *) abstime;
};
check_syscall_args(sys__ksem_timedwait)
struct sys_mq_open_args {
syscallarg(const char *) name;
syscallarg(int) oflag;
@ -3163,6 +3169,8 @@ int sys__ksem_getvalue(struct lwp *, const struct sys__ksem_getvalue_args *, reg
int sys__ksem_destroy(struct lwp *, const struct sys__ksem_destroy_args *, register_t *);
int sys__ksem_timedwait(struct lwp *, const struct sys__ksem_timedwait_args *, register_t *);
int sys_mq_open(struct lwp *, const struct sys_mq_open_args *, register_t *);
int sys_mq_close(struct lwp *, const struct sys_mq_close_args *, register_t *);

View File

@ -9,6 +9,7 @@ ATF_TP_ADD_TCS(tp)
ATF_TP_ADD_TC(tp, destroy);
ATF_TP_ADD_TC(tp, busydestroy);
ATF_TP_ADD_TC(tp, blockwait);
ATF_TP_ADD_TC(tp, blocktimedwait);
ATF_TP_ADD_TC(tp, named);
ATF_TP_ADD_TC(tp, unlink);

View File

@ -1,4 +1,4 @@
/* $NetBSD: sem.c,v 1.8 2011/03/23 13:57:04 joerg Exp $ */
/* $NetBSD: sem.c,v 1.9 2012/03/08 21:59:32 joerg Exp $ */
/*
* Common code for semaphore tests. This can be included both into
@ -202,6 +202,31 @@ ATF_TC_BODY(blockwait, tc)
pthread_join(pt, NULL);
}
ATF_TC(blocktimedwait);
ATF_TC_HEAD(blocktimedwait, tc)
{
atf_tc_set_md_var(tc, "descr", "tests sem_timedwait can handle blocking"
" (%s)", LIBNAME);
atf_tc_set_md_var(tc, "timeout", "2");
}
ATF_TC_BODY(blocktimedwait, tc)
{
sem_t semid;
struct timespec tp;
rump_init();
clock_gettime(CLOCK_REALTIME, &tp);
tp.tv_nsec += 50000000;
tp.tv_sec += tp.tv_nsec / 1000000000;
tp.tv_nsec %= 1000000000;
ATF_REQUIRE_EQ(sem_init(&semid, 1, 0), 0);
ATF_REQUIRE_ERRNO(ETIMEDOUT, sem_timedwait(&semid, &tp) == -1);
}
ATF_TC(named);
ATF_TC_HEAD(named, tc)
{
@ -302,6 +327,7 @@ F1(unlink, const char *);
F1(trywait, intptr_t);
F1(wait, intptr_t);
F2(getvalue, intptr_t, unsigned int *);
F2(timedwait, intptr_t, const struct timespec *);
int _ksem_open(const char *, int, mode_t, unsigned int, intptr_t *);
int _ksem_open(const char *a, int b, mode_t c, unsigned int d, intptr_t *e)
{return rump_sys__ksem_open(a,b,c,d,e);}