CVS commit: src/lib/librt

2019-02-21 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Feb 21 21:54:09 UTC 2019

Modified Files:
src/lib/librt: sem_init.3

Log Message:
Mention that ENOSPC can be returned if we exhausted the max number of
semaphores.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/lib/librt/sem_init.3

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/librt/sem_init.3
diff -u src/lib/librt/sem_init.3:1.4 src/lib/librt/sem_init.3:1.5
--- src/lib/librt/sem_init.3:1.4	Fri Jul  6 21:39:59 2012
+++ src/lib/librt/sem_init.3	Thu Feb 21 16:54:09 2019
@@ -1,4 +1,4 @@
-.\" $NetBSD: sem_init.3,v 1.4 2012/07/07 01:39:59 joerg Exp $
+.\" $NetBSD: sem_init.3,v 1.5 2019/02/21 21:54:09 christos Exp $
 .\"
 .\" Copyright (C) 2000 Jason Evans .
 .\" 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 July 7, 2012
+.Dd February 21, 2019
 .Dt SEM_INIT 3
 .Os
 .Sh NAME
@@ -73,7 +73,9 @@ will fail if:
 .Fa value
 exceeds SEM_VALUE_MAX.
 .It Bq Er ENOSPC
-Memory allocation error.
+There was memory allocation error, or the limit on available semaphores
+.Dv ( SEM_NSEMS_MAX )
+has been exceeded.
 .It Bq Er EPERM
 Unable to initialize a shared semaphore.
 .El



CVS commit: src/lib/librt

2019-02-21 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Feb 21 21:54:09 UTC 2019

Modified Files:
src/lib/librt: sem_init.3

Log Message:
Mention that ENOSPC can be returned if we exhausted the max number of
semaphores.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/lib/librt/sem_init.3

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/lib/librt

2019-02-21 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Feb 21 21:33:34 UTC 2019

Modified Files:
src/lib/librt: sem.c

Log Message:
- KNF return
- be careful with errno, only set it when it is possibly set and not before
  a system call.
- factor out a common mask comparison.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/lib/librt/sem.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/librt/sem.c
diff -u src/lib/librt/sem.c:1.8 src/lib/librt/sem.c:1.9
--- src/lib/librt/sem.c:1.8	Sat Feb  2 22:20:24 2019
+++ src/lib/librt/sem.c	Thu Feb 21 16:33:34 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: sem.c,v 1.8 2019/02/03 03:20:24 thorpej Exp $	*/
+/*	$NetBSD: sem.c,v 1.9 2019/02/21 21:33:34 christos Exp $	*/
 
 /*-
  * Copyright (c) 2003, 2019 The NetBSD Foundation, Inc.
@@ -59,7 +59,7 @@
  */
 
 #include 
-__RCSID("$NetBSD: sem.c,v 1.8 2019/02/03 03:20:24 thorpej Exp $");
+__RCSID("$NetBSD: sem.c,v 1.9 2019/02/21 21:33:34 christos Exp $");
 
 #ifndef __LIBPTHREAD_SOURCE__
 /*
@@ -93,6 +93,7 @@ __RCSID("$NetBSD: sem.c,v 1.8 2019/02/03
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 
@@ -104,8 +105,10 @@ __RCSID("$NetBSD: sem.c,v 1.8 2019/02/03
 #define	SEM_MAGIC		0x90af0421U
 #define	SEM_MAGIC_NAMED		(SEM_MAGIC ^ SEM_NAMED)
 
-#define	SEM_IS_KSEMID(k)	intptr_t)(k)) & KSEM_MARKER_MASK)	\
+#define	SEMID_IS_KSEMID(id)	(((uint32_t)(id) & KSEM_MARKER_MASK)	\
 		== KSEM_PSHARED_MARKER)
+#define	SEM_IS_KSEMID(k)	SEMID_IS_KSEMID((intptr_t)(k))	
+			
 
 #define	SEM_IS_UNNAMED(k)	(SEM_IS_KSEMID(k) ||			\
  (k)->ksem_magic == SEM_MAGIC)
@@ -177,16 +180,16 @@ sem_alloc(unsigned int value, intptr_t s
 	sem_t sem;
 
 	if (value > SEM_VALUE_MAX)
-		return (EINVAL);
+		return EINVAL;
 
 	if ((sem = malloc(sizeof(struct _sem_st))) == NULL)
-		return (ENOSPC);
+		return ENOSPC;
 
 	sem->ksem_magic = magic;
 	sem->ksem_semid = semid;
  
 	*semp = sem;
-	return (0);
+	return 0;
 }
 
 /* ARGSUSED */
@@ -197,7 +200,7 @@ sem_init(sem_t *sem, int pshared, unsign
 	int error;
 
 	if (_ksem_init(value, ) == -1)
-		return (-1);
+		return -1;
 
 	/*
 	 * pshared anonymous semaphores are treated a little differently.
@@ -213,22 +216,22 @@ sem_init(sem_t *sem, int pshared, unsign
 	 * non-pshared semaphores.
 	 */
 	if (pshared) {
-		if ((semid & KSEM_MARKER_MASK) != KSEM_PSHARED_MARKER) {
+		if (!SEMID_IS_KSEMID(semid)) {
 			_ksem_destroy(semid);
 			errno = ENOTSUP;
-			return (-1);
+			return -1;
 		}
 		*sem = (sem_t)semid;
-		return (0);
+		return 0;
 	}
 
 	if ((error = sem_alloc(value, semid, SEM_MAGIC, sem)) != 0) {
 		_ksem_destroy(semid);
 		errno = error;
-		return (-1);
+		return -1;
 	}
 
-	return (0);
+	return 0;
 }
 
 int
@@ -239,7 +242,7 @@ sem_destroy(sem_t *sem)
 #ifdef ERRORCHECK
 	if (sem == NULL || *sem == NULL || !SEM_MAGIC_OK(*sem)) {
 		errno = EINVAL;
-		return (-1);
+		return -1;
 	}
 #endif
 
@@ -248,13 +251,14 @@ sem_destroy(sem_t *sem)
 	} else {
 		if (SEM_IS_NAMED(*sem)) {
 			errno = EINVAL;
-			return (-1);
+			return -1;
 		}
 
 		error = _ksem_destroy((*sem)->ksem_semid);
 		save_errno = errno;
 		sem_free(*sem);
-		errno = save_errno;
+		if (error == -1)
+			errno = save_errno;
 	}
 
 	return error;
@@ -285,7 +289,7 @@ sem_open(const char *name, int oflag, ..
 	 * we'll just merge duplicate IDs into our list.
 	 */
 	if (_ksem_open(name, oflag, mode, value, ) == -1)
-		return (SEM_FAILED);
+		return SEM_FAILED;
 
 	/*
 	 * Search for a duplicate ID, we must return the same sem_t *
@@ -295,7 +299,7 @@ sem_open(const char *name, int oflag, ..
 	LIST_FOREACH(s, _sems, ksem_list) {
 		if (s->ksem_semid == semid) {
 			UNLOCK_NAMED_SEMS();
-			return (s->ksem_identity);
+			return s->ksem_identity;
 		}
 	}
 
@@ -310,7 +314,7 @@ sem_open(const char *name, int oflag, ..
 	UNLOCK_NAMED_SEMS();
 	(*sem)->ksem_identity = sem;
 
-	return (sem);
+	return sem;
 
  bad:
 	UNLOCK_NAMED_SEMS();
@@ -321,7 +325,7 @@ sem_open(const char *name, int oflag, ..
 		free(sem);
 	}
 	errno = error;
-	return (SEM_FAILED);
+	return SEM_FAILED;
 }
 
 int
@@ -332,13 +336,13 @@ sem_close(sem_t *sem)
 #ifdef ERRORCHECK
 	if (sem == NULL || *sem == NULL || !SEM_MAGIC_OK(*sem)) {
 		errno = EINVAL;
-		return (-1);
+		return -1;
 	}
 #endif
 
 	if (!SEM_IS_NAMED(*sem)) {
 		errno = EINVAL;
-		return (-1);
+		return -1;
 	}
 
 	LOCK_NAMED_SEMS();
@@ -348,7 +352,8 @@ sem_close(sem_t *sem)
 	UNLOCK_NAMED_SEMS();
 	sem_free(*sem);
 	free(sem);
-	errno = save_errno;
+	if (error == -1)
+		errno = save_errno;
 	return error;
 }
 
@@ -356,7 +361,7 @@ int
 sem_unlink(const char *name)
 {
 
-	return (_ksem_unlink(name));
+	return _ksem_unlink(name);
 }
 
 int
@@ -366,11 +371,11 @@ sem_wait(sem_t *sem)
 #ifdef ERRORCHECK
 	if (sem == NULL || *sem == NULL || !SEM_MAGIC_OK(*sem)) {
 		errno = EINVAL;
-		return (-1);
+		return -1;
 	}
 #endif
 
-	return (_ksem_wait(sem_to_semid(sem)));
+	return 

CVS commit: src/lib/librt

2019-02-21 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Feb 21 21:33:34 UTC 2019

Modified Files:
src/lib/librt: sem.c

Log Message:
- KNF return
- be careful with errno, only set it when it is possibly set and not before
  a system call.
- factor out a common mask comparison.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/lib/librt/sem.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/lib/librt

2018-05-05 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Sat May  5 06:39:10 UTC 2018

Modified Files:
src/lib/librt: sem_open.3

Log Message:
file system police; remove trailing whitespace; merge two error sections
for same error.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/lib/librt/sem_open.3

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/lib/librt

2018-05-05 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Sat May  5 06:39:10 UTC 2018

Modified Files:
src/lib/librt: sem_open.3

Log Message:
file system police; remove trailing whitespace; merge two error sections
for same error.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/lib/librt/sem_open.3

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/librt/sem_open.3
diff -u src/lib/librt/sem_open.3:1.7 src/lib/librt/sem_open.3:1.8
--- src/lib/librt/sem_open.3:1.7	Fri May  4 20:28:51 2018
+++ src/lib/librt/sem_open.3	Sat May  5 06:39:10 2018
@@ -1,4 +1,4 @@
-.\" $NetBSD: sem_open.3,v 1.7 2018/05/04 20:28:51 christos Exp $
+.\" $NetBSD: sem_open.3,v 1.8 2018/05/05 06:39:10 wiz Exp $
 .\"
 .\" Copyright (C) 2000 Jason Evans .
 .\" All rights reserved.
@@ -150,15 +150,14 @@ are set but the semaphore already exists
 .It Bq Er EINTR
 The call was interrupted by a signal.
 .It Bq Er EINVAL
-The 
-.Fa name 
+The
+.Fa name
 argument does not begin with a
 .Sq /
 or contains more slashes.
 This is implementation-specific behavior and allowed by
 .St -p1003.1-96 .
-.It Bq Er EINVAL
-The
+Or, the
 .Fa value
 argument is greater than
 .Dv SEM_VALUE_MAX .
@@ -170,7 +169,7 @@ The specified
 .Fa name
 is longer than
 .Dv NAME_MAX ,
-or longer than the implementing filesystem will allow.
+or longer than the implementing file system will allow.
 .It Bq Er ENFILE
 The system limit on semaphores has been reached.
 .It Bq Er ENOENT
@@ -201,7 +200,7 @@ The specified
 .Fa name
 is longer than
 .Dv NAME_MAX ,
-or longer than the implementing filesystem will allow.
+or longer than the implementing file system will allow.
 .It Bq Er ENOENT
 The named semaphore does not exist.
 .El



CVS commit: src/lib/librt

2018-05-04 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri May  4 20:28:51 UTC 2018

Modified Files:
src/lib/librt: sem_open.3

Log Message:
It is not a bug that we are only allowing /name. Update for newly allowed
length.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/lib/librt/sem_open.3

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/lib/librt

2018-05-04 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri May  4 20:28:51 UTC 2018

Modified Files:
src/lib/librt: sem_open.3

Log Message:
It is not a bug that we are only allowing /name. Update for newly allowed
length.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/lib/librt/sem_open.3

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/librt/sem_open.3
diff -u src/lib/librt/sem_open.3:1.6 src/lib/librt/sem_open.3:1.7
--- src/lib/librt/sem_open.3:1.6	Thu Mar  8 17:12:52 2012
+++ src/lib/librt/sem_open.3	Fri May  4 16:28:51 2018
@@ -1,4 +1,4 @@
-.\" $NetBSD: sem_open.3,v 1.6 2012/03/08 22:12:52 wiz Exp $
+.\" $NetBSD: sem_open.3,v 1.7 2018/05/04 20:28:51 christos Exp $
 .\"
 .\" Copyright (C) 2000 Jason Evans .
 .\" 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 February 29, 2012
+.Dd May 4, 2018
 .Dt SEM_OPEN 3
 .Os
 .Sh NAME
@@ -150,11 +150,15 @@ are set but the semaphore already exists
 .It Bq Er EINTR
 The call was interrupted by a signal.
 .It Bq Er EINVAL
+The 
+.Fa name 
+argument does not begin with a
+.Sq /
+or contains more slashes.
+This is implementation-specific behavior and allowed by
+.St -p1003.1-96 .
+.It Bq Er EINVAL
 The
-.Fn sem_open
-operation is not supported for the given
-.Fa name ;
-or the
 .Fa value
 argument is greater than
 .Dv SEM_VALUE_MAX .
@@ -162,9 +166,11 @@ argument is greater than
 .\".It Bq Er EMFILE
 .\"Too many semaphores are in use by this process.
 .It Bq Er ENAMETOOLONG
-The
+The specified
 .Fa name
-argument is too long.
+is longer than
+.Dv NAME_MAX ,
+or longer than the implementing filesystem will allow.
 .It Bq Er ENFILE
 The system limit on semaphores has been reached.
 .It Bq Er ENOENT
@@ -193,7 +199,9 @@ Permission is denied to unlink the semap
 .It Bq Er ENAMETOOLONG
 The specified
 .Fa name
-is too long.
+is longer than
+.Dv NAME_MAX ,
+or longer than the implementing filesystem will allow.
 .It Bq Er ENOENT
 The named semaphore does not exist.
 .El
@@ -218,11 +226,3 @@ functions conform to
 .Sh HISTORY
 Support for named semaphores first appeared in
 .Nx 2.0 .
-.Sh BUGS
-This implementation places strict requirements on the value of
-.Fa name :
-it must begin with a slash
-.Pq Ql / ,
-contain no other slash characters,
-and be less than 14 characters in length
-not including the terminating null character.



CVS commit: src/lib/librt

2016-09-15 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Thu Sep 15 07:53:59 UTC 2016

Modified Files:
src/lib/librt: sched.3

Log Message:
Fix function name macro.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/lib/librt/sched.3

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/lib/librt

2016-09-15 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Thu Sep 15 07:53:59 UTC 2016

Modified Files:
src/lib/librt: sched.3

Log Message:
Fix function name macro.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/lib/librt/sched.3

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/librt/sched.3
diff -u src/lib/librt/sched.3:1.17 src/lib/librt/sched.3:1.18
--- src/lib/librt/sched.3:1.17	Fri Aug  5 13:03:13 2016
+++ src/lib/librt/sched.3	Thu Sep 15 07:53:59 2016
@@ -1,4 +1,4 @@
-.\"	$NetBSD: sched.3,v 1.17 2016/08/05 13:03:13 christos Exp $
+.\"	$NetBSD: sched.3,v 1.18 2016/09/15 07:53:59 njoly Exp $
 .\"
 .\" Copyright (c) 2008, 2016 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -64,9 +64,9 @@
 .Ft int
 .Fn sched_yield "void"
 .Ft int
-.fn sched_setaffinity_np "pid_t pid" "size_t size" "cpuset_t *cpuset"
+.Fn sched_setaffinity_np "pid_t pid" "size_t size" "cpuset_t *cpuset"
 .Ft int
-.fn sched_getaffinity_np "pid_t pid" "size_t size" "cpuset_t *cpuset"
+.Fn sched_getaffinity_np "pid_t pid" "size_t size" "cpuset_t *cpuset"
 .Ft int
 .Fn sched_protect "int priority"
 .Sh DESCRIPTION



CVS commit: src/lib/librt

2016-08-05 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Aug  5 13:03:13 UTC 2016

Modified Files:
src/lib/librt: Makefile sched.3

Log Message:
add missing stuff for the affinity calls (Rocky Hotas)


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/lib/librt/Makefile
cvs rdiff -u -r1.16 -r1.17 src/lib/librt/sched.3

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/lib/librt

2016-08-05 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Aug  5 13:03:13 UTC 2016

Modified Files:
src/lib/librt: Makefile sched.3

Log Message:
add missing stuff for the affinity calls (Rocky Hotas)


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/lib/librt/Makefile
cvs rdiff -u -r1.16 -r1.17 src/lib/librt/sched.3

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/librt/Makefile
diff -u src/lib/librt/Makefile:1.19 src/lib/librt/Makefile:1.20
--- src/lib/librt/Makefile:1.19	Tue Jul  5 17:13:12 2016
+++ src/lib/librt/Makefile	Fri Aug  5 09:03:13 2016
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.19 2016/07/05 21:13:12 christos Exp $
+#	$NetBSD: Makefile,v 1.20 2016/08/05 13:03:13 christos Exp $
 #
 
 .include 
@@ -40,6 +40,8 @@ MLINKS+=	sched.3 sched_get_priority_max.
 MLINKS+=	sched.3 sched_get_priority_min.3
 MLINKS+=	sched.3 sched_rr_get_interval.3
 MLINKS+=	sched.3 sched_yield.3
+MLINKS+=	sched.3 sched_setaffinity_np.3
+MLINKS+=	sched.3 sched_getaffinity_np.3
 
 MLINKS+=	shm_open.3 shm_unlink.3
 

Index: src/lib/librt/sched.3
diff -u src/lib/librt/sched.3:1.16 src/lib/librt/sched.3:1.17
--- src/lib/librt/sched.3:1.16	Fri Aug  5 04:55:28 2016
+++ src/lib/librt/sched.3	Fri Aug  5 09:03:13 2016
@@ -1,6 +1,6 @@
-.\"	$NetBSD: sched.3,v 1.16 2016/08/05 08:55:28 wiz Exp $
+.\"	$NetBSD: sched.3,v 1.17 2016/08/05 13:03:13 christos Exp $
 .\"
-.\" Copyright (c) 2008 The NetBSD Foundation, Inc.
+.\" Copyright (c) 2008, 2016 The NetBSD Foundation, Inc.
 .\" All rights reserved.
 .\"
 .\" This code is derived from software contributed to The NetBSD Foundation
@@ -27,7 +27,7 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd August 4, 2016
+.Dd August 5, 2016
 .Dt SCHED 3
 .Os
 .Sh NAME
@@ -39,7 +39,9 @@
 .Nm sched_get_priority_min ,
 .Nm sched_rr_get_interval ,
 .Nm sched_yield ,
-.Nm sched_protect
+.Nm sched_protect ,
+.Nm sched_setaffinity_np ,
+.Nm sched_getaffinity_np
 .Nd process scheduling
 .Sh LIBRARY
 .Lb librt
@@ -62,6 +64,10 @@
 .Ft int
 .Fn sched_yield "void"
 .Ft int
+.fn sched_setaffinity_np "pid_t pid" "size_t size" "cpuset_t *cpuset"
+.Ft int
+.fn sched_getaffinity_np "pid_t pid" "size_t size" "cpuset_t *cpuset"
+.Ft int
 .Fn sched_protect "int priority"
 .Sh DESCRIPTION
 This section describes the functions used to get scheduling information



CVS commit: src/lib/librt

2016-08-05 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Fri Aug  5 08:55:29 UTC 2016

Modified Files:
src/lib/librt: sched.3

Log Message:
Remove trailing whitespace.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/lib/librt/sched.3

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/lib/librt

2016-08-05 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Fri Aug  5 08:55:29 UTC 2016

Modified Files:
src/lib/librt: sched.3

Log Message:
Remove trailing whitespace.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/lib/librt/sched.3

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/librt/sched.3
diff -u src/lib/librt/sched.3:1.15 src/lib/librt/sched.3:1.16
--- src/lib/librt/sched.3:1.15	Thu Aug  4 07:09:15 2016
+++ src/lib/librt/sched.3	Fri Aug  5 08:55:28 2016
@@ -1,4 +1,4 @@
-.\"	$NetBSD: sched.3,v 1.15 2016/08/04 07:09:15 christos Exp $
+.\"	$NetBSD: sched.3,v 1.16 2016/08/05 08:55:28 wiz Exp $
 .\"
 .\" Copyright (c) 2008 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -160,12 +160,12 @@ Performs priority protection using the
 .Dv PTHREAD_PRIO_PROTECT
 protocol.
 This function will increase the protected priority of the caller thread to
-.Fa priority 
+.Fa priority
 if the current thread's protected priority is smaller than
 .Fa priority .
 Multiple calls to
 .Fn sched_protect
-with a positive priority will 
+with a positive priority will
 .Dq push
 a priority level to the current thread, whereas calling
 .Fn sched_protect
@@ -177,7 +177,7 @@ will
 .Dq pop
 a priority level.
 When the level reaches
-.Dv 0 
+.Dv 0
 (the same number of
 .Dq pushes
 and



CVS commit: src/lib/librt

2016-08-04 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Aug  4 07:09:15 UTC 2016

Modified Files:
src/lib/librt: sched.3

Log Message:
Flesh out sched_protect


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/lib/librt/sched.3

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/lib/librt

2016-08-04 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Aug  4 07:09:15 UTC 2016

Modified Files:
src/lib/librt: sched.3

Log Message:
Flesh out sched_protect


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/lib/librt/sched.3

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/librt/sched.3
diff -u src/lib/librt/sched.3:1.14 src/lib/librt/sched.3:1.15
--- src/lib/librt/sched.3:1.14	Wed Jul  6 11:55:02 2016
+++ src/lib/librt/sched.3	Thu Aug  4 03:09:15 2016
@@ -1,4 +1,4 @@
-.\"	$NetBSD: sched.3,v 1.14 2016/07/06 15:55:02 wiz Exp $
+.\"	$NetBSD: sched.3,v 1.15 2016/08/04 07:09:15 christos Exp $
 .\"
 .\" Copyright (c) 2008 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -27,7 +27,7 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd July 5, 2016
+.Dd August 4, 2016
 .Dt SCHED 3
 .Os
 .Sh NAME
@@ -156,11 +156,33 @@ Get the affinity mask of the process spe
 into the
 .Fa cpuset .
 .It Fn sched_protect priority
-Performs priority protection for
+Performs priority protection using the
 .Dv PTHREAD_PRIO_PROTECT
 protocol.
-This function will increase the priority of the caller thread to
+This function will increase the protected priority of the caller thread to
+.Fa priority 
+if the current thread's protected priority is smaller than
 .Fa priority .
+Multiple calls to
+.Fn sched_protect
+with a positive priority will 
+.Dq push
+a priority level to the current thread, whereas calling
+.Fn sched_protect
+with a
+.Fa priority
+level of
+.Dv \-1
+will
+.Dq pop
+a priority level.
+When the level reaches
+.Dv 0 
+(the same number of
+.Dq pushes
+and
+.Dq pops
+have been issued) the original thread priority will be restored.
 .El
 .Sh IMPLEMENTATION NOTES
 Setting CPU
@@ -274,6 +296,21 @@ and the value of
 .Fa pid
 is not zero.
 .El
+.Pp
+The
+.Fn sched_protect
+function fails if:
+.Bl -tag -width Er
+.It Bq Er EINVAL
+The thread was not priority protected.
+.It Bq Er EPERM
+The
+.Fa priority
+parameter was out of range (not in the range between
+.Dv SCHED_PRIO_MIN
+and
+.Dv SCHED_PRIO_MAX ) .
+.El
 .Sh SEE ALSO
 .Xr affinity 3 ,
 .Xr cpuset 3 ,



CVS commit: src/lib/librt

2016-07-06 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Wed Jul  6 15:55:02 UTC 2016

Modified Files:
src/lib/librt: sched.3

Log Message:
Markup improvements.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/lib/librt/sched.3

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/lib/librt

2016-07-06 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Wed Jul  6 15:55:02 UTC 2016

Modified Files:
src/lib/librt: sched.3

Log Message:
Markup improvements.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/lib/librt/sched.3

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/librt/sched.3
diff -u src/lib/librt/sched.3:1.13 src/lib/librt/sched.3:1.14
--- src/lib/librt/sched.3:1.13	Tue Jul  5 21:13:12 2016
+++ src/lib/librt/sched.3	Wed Jul  6 15:55:02 2016
@@ -1,4 +1,4 @@
-.\"	$NetBSD: sched.3,v 1.13 2016/07/05 21:13:12 christos Exp $
+.\"	$NetBSD: sched.3,v 1.14 2016/07/06 15:55:02 wiz Exp $
 .\"
 .\" Copyright (c) 2008 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -156,9 +156,11 @@ Get the affinity mask of the process spe
 into the
 .Fa cpuset .
 .It Fn sched_protect priority
-Performs priority protection for PTHREAD_PRIO_PROTECT protocol.
+Performs priority protection for
+.Dv PTHREAD_PRIO_PROTECT
+protocol.
 This function will increase the priority of the caller thread to
-.Fa priority.
+.Fa priority .
 .El
 .Sh IMPLEMENTATION NOTES
 Setting CPU



CVS commit: src/lib/librt

2016-02-20 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sat Feb 20 16:00:10 UTC 2016

Modified Files:
src/lib/librt: sched.3

Log Message:
Note that SCHED_OTHER must have priority PRI_NONE.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/lib/librt/sched.3

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/lib/librt

2016-02-20 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sat Feb 20 16:00:10 UTC 2016

Modified Files:
src/lib/librt: sched.3

Log Message:
Note that SCHED_OTHER must have priority PRI_NONE.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/lib/librt/sched.3

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/librt/sched.3
diff -u src/lib/librt/sched.3:1.11 src/lib/librt/sched.3:1.12
--- src/lib/librt/sched.3:1.11	Sun Dec  4 21:08:44 2011
+++ src/lib/librt/sched.3	Sat Feb 20 16:00:10 2016
@@ -1,4 +1,4 @@
-.\"	$NetBSD: sched.3,v 1.11 2011/12/04 21:08:44 jym Exp $
+.\"	$NetBSD: sched.3,v 1.12 2016/02/20 16:00:10 riastradh Exp $
 .\"
 .\" Copyright (c) 2008 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -82,6 +82,12 @@ contains at least one member:
 .Bl -tag -width flags
 .It Fa sched_priority
 Specifies the priority of the process.
+For
+.Dv SCHED_OTHER ,
+must be
+.Dv PRI_NONE ;
+the kernel will dynamically assign priorities to the thread based on
+CPU load.
 .El
 .Sh FUNCTIONS
 .Bl -tag -width compact



CVS commit: src/lib/librt

2015-11-18 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Wed Nov 18 13:19:52 UTC 2015

Modified Files:
src/lib/librt: mq_receive.3

Log Message:
Update RETURN VALUE to match reality and POSIX


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/lib/librt/mq_receive.3

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/lib/librt

2015-11-18 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Wed Nov 18 13:19:52 UTC 2015

Modified Files:
src/lib/librt: mq_receive.3

Log Message:
Update RETURN VALUE to match reality and POSIX


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/lib/librt/mq_receive.3

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/librt/mq_receive.3
diff -u src/lib/librt/mq_receive.3:1.4 src/lib/librt/mq_receive.3:1.5
--- src/lib/librt/mq_receive.3:1.4	Thu Mar 15 19:04:47 2012
+++ src/lib/librt/mq_receive.3	Wed Nov 18 13:19:52 2015
@@ -1,4 +1,4 @@
-.\"	$NetBSD: mq_receive.3,v 1.4 2012/03/15 19:04:47 njoly Exp $
+.\"	$NetBSD: mq_receive.3,v 1.5 2015/11/18 13:19:52 pgoyette Exp $
 .\"
 .\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
 .\"
@@ -100,7 +100,8 @@ Upon successful completion, the
 .Fn mq_receive
 and
 .Fn mq_timedreceive
-functions return a value of zero.
+functions return the length of the selected message in bytes, and the
+message is removed from the queue.
 Otherwise, no message will be removed from the queue,
 the functions return a value of
 \-1, and set the global variable



CVS commit: src/lib/librt

2015-11-18 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Thu Nov 19 07:03:13 UTC 2015

Modified Files:
src/lib/librt: mq_receive.3

Log Message:
Bump date for previous.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/lib/librt/mq_receive.3

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/librt/mq_receive.3
diff -u src/lib/librt/mq_receive.3:1.5 src/lib/librt/mq_receive.3:1.6
--- src/lib/librt/mq_receive.3:1.5	Wed Nov 18 13:19:52 2015
+++ src/lib/librt/mq_receive.3	Thu Nov 19 07:03:13 2015
@@ -1,8 +1,8 @@
-.\"	$NetBSD: mq_receive.3,v 1.5 2015/11/18 13:19:52 pgoyette Exp $
+.\"	$NetBSD: mq_receive.3,v 1.6 2015/11/19 07:03:13 wiz Exp $
 .\"
 .\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
 .\"
-.Dd June 7, 2010
+.Dd November 18, 2015
 .Dt MQ_RECEIVE 3
 .Os
 .Sh NAME



CVS commit: src/lib/librt

2015-11-18 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Thu Nov 19 07:03:13 UTC 2015

Modified Files:
src/lib/librt: mq_receive.3

Log Message:
Bump date for previous.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/lib/librt/mq_receive.3

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/lib/librt

2015-07-08 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Jul  8 07:14:38 UTC 2015

Modified Files:
src/lib/librt: shm.c

Log Message:
Simplify previous by just doing an open() on the directory and then using
the fstat* family to test for all relevant details.
Clean up buffer sizes and clarify a length check. Based on input from dholland.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/lib/librt/shm.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/librt/shm.c
diff -u src/lib/librt/shm.c:1.2 src/lib/librt/shm.c:1.3
--- src/lib/librt/shm.c:1.2	Tue Jun 30 11:46:47 2015
+++ src/lib/librt/shm.c	Wed Jul  8 07:14:38 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: shm.c,v 1.2 2015/06/30 11:46:47 martin Exp $	*/
+/*	$NetBSD: shm.c,v 1.3 2015/07/08 07:14:38 martin Exp $	*/
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include sys/cdefs.h
-__RCSID($NetBSD: shm.c,v 1.2 2015/06/30 11:46:47 martin Exp $);
+__RCSID($NetBSD: shm.c,v 1.3 2015/07/08 07:14:38 martin Exp $);
 
 #include sys/mman.h
 #include sys/mount.h
@@ -57,45 +57,36 @@ __RCSID($NetBSD: shm.c,v 1.2 2015/06/30
 
 #define	MOUNT_SHMFS		MOUNT_TMPFS
 
-static const char *		_shmfs_path = NULL;
-static char			_shmfs_path_buf[PATH_MAX];
+static bool			shm_ok = false;
 
 static bool
 _shm_check_fs(void)
 {
-	const char *shmfs = SHMFS_DIR_PATH;
+	int fd;
 	struct statvfs sv;
 	struct stat st;
-	char buf[PATH_MAX];
-	ssize_t cnt;
 
-	if ((cnt = readlink(shmfs, buf, sizeof(buf)))  0) {
-		if ((size_t)cnt = sizeof(buf))
-			return false;
-		buf[cnt] = 0;
-		shmfs = buf;
-	}
-	if (statvfs1(shmfs, sv, ST_NOWAIT) == -1) {
-		return false;
-	}
-	if (strncmp(sv.f_fstypename, MOUNT_SHMFS, sizeof(sv.f_fstypename))) {
+	fd = open(SHMFS_DIR_PATH, O_DIRECTORY|O_RDONLY);
+	if (fd == -1)
 		return false;
-	}
 
-	if (lstat(shmfs, st) == -1) {
-		return false;
-	}
-	if ((st.st_mode  SHMFS_DIR_MODE) != SHMFS_DIR_MODE) {
-		return false;
-	}
+	if (fstatvfs1(fd, sv, ST_NOWAIT) == -1)
+		goto out;
 
-	if (shmfs == buf) {
-		strcpy(_shmfs_path_buf, buf);
-		_shmfs_path = _shmfs_path_buf;
-	} else {
-		_shmfs_path = shmfs;
-	}
-	return true;
+	if (strncmp(sv.f_fstypename, MOUNT_SHMFS, sizeof(sv.f_fstypename)))
+		goto out;
+
+	if (fstat(fd, st) == -1)
+		goto out;
+
+	if ((st.st_mode  SHMFS_DIR_MODE) != SHMFS_DIR_MODE)
+		goto out;
+
+	shm_ok = true;
+
+out:
+	close(fd);
+	return shm_ok;
 }
 
 static bool
@@ -103,7 +94,7 @@ _shm_get_path(char *buf, size_t len, con
 {
 	int ret;
 
-	if (__predict_false(!_shmfs_path)  !_shm_check_fs()) {
+	if (__predict_false(!shm_ok)  !_shm_check_fs()) {
 		errno = ENOTSUP;
 		return false;
 	}
@@ -117,10 +108,10 @@ _shm_get_path(char *buf, size_t len, con
 		return false;
 	}
 
-	ret = snprintf(buf, len, %s/%s%s,
-	_shmfs_path, SHMFS_OBJ_PREFIX, name);
+	ret = snprintf(buf, len, SHMFS_DIR_PATH / SHMFS_OBJ_PREFIX %s,
+	name);
 
-	if ((size_t)ret = PATH_MAX) {
+	if ((size_t)ret = len) {
 		errno = ENAMETOOLONG;
 		return false;
 	}
@@ -130,7 +121,7 @@ _shm_get_path(char *buf, size_t len, con
 int
 shm_open(const char *name, int oflag, mode_t mode)
 {
-	char path[PATH_MAX + 1];
+	char path[PATH_MAX];
 
 	if (!_shm_get_path(path, sizeof(path), name)) {
 		return -1;
@@ -141,7 +132,7 @@ shm_open(const char *name, int oflag, mo
 int
 shm_unlink(const char *name)
 {
-	char path[PATH_MAX + 1];
+	char path[PATH_MAX];
 
 	if (!_shm_get_path(path, sizeof(path), name)) {
 		return -1;



CVS commit: src/lib/librt

2015-07-08 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Jul  8 07:14:38 UTC 2015

Modified Files:
src/lib/librt: shm.c

Log Message:
Simplify previous by just doing an open() on the directory and then using
the fstat* family to test for all relevant details.
Clean up buffer sizes and clarify a length check. Based on input from dholland.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/lib/librt/shm.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/lib/librt

2015-06-30 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Jun 30 11:46:47 UTC 2015

Modified Files:
src/lib/librt: shm.c

Log Message:
Allow /var/shm to be a symlink to a properly set up directory.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/lib/librt/shm.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/lib/librt

2015-06-30 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Jun 30 11:46:47 UTC 2015

Modified Files:
src/lib/librt: shm.c

Log Message:
Allow /var/shm to be a symlink to a properly set up directory.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/lib/librt/shm.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/librt/shm.c
diff -u src/lib/librt/shm.c:1.1 src/lib/librt/shm.c:1.2
--- src/lib/librt/shm.c:1.1	Thu Dec 19 19:11:50 2013
+++ src/lib/librt/shm.c	Tue Jun 30 11:46:47 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: shm.c,v 1.1 2013/12/19 19:11:50 rmind Exp $	*/
+/*	$NetBSD: shm.c,v 1.2 2015/06/30 11:46:47 martin Exp $	*/
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include sys/cdefs.h
-__RCSID($NetBSD: shm.c,v 1.1 2013/12/19 19:11:50 rmind Exp $);
+__RCSID($NetBSD: shm.c,v 1.2 2015/06/30 11:46:47 martin Exp $);
 
 #include sys/mman.h
 #include sys/mount.h
@@ -58,6 +58,7 @@ __RCSID($NetBSD: shm.c,v 1.1 2013/12/19
 #define	MOUNT_SHMFS		MOUNT_TMPFS
 
 static const char *		_shmfs_path = NULL;
+static char			_shmfs_path_buf[PATH_MAX];
 
 static bool
 _shm_check_fs(void)
@@ -65,7 +66,15 @@ _shm_check_fs(void)
 	const char *shmfs = SHMFS_DIR_PATH;
 	struct statvfs sv;
 	struct stat st;
+	char buf[PATH_MAX];
+	ssize_t cnt;
 
+	if ((cnt = readlink(shmfs, buf, sizeof(buf)))  0) {
+		if ((size_t)cnt = sizeof(buf))
+			return false;
+		buf[cnt] = 0;
+		shmfs = buf;
+	}
 	if (statvfs1(shmfs, sv, ST_NOWAIT) == -1) {
 		return false;
 	}
@@ -80,7 +89,12 @@ _shm_check_fs(void)
 		return false;
 	}
 
-	_shmfs_path = shmfs;
+	if (shmfs == buf) {
+		strcpy(_shmfs_path_buf, buf);
+		_shmfs_path = _shmfs_path_buf;
+	} else {
+		_shmfs_path = shmfs;
+	}
 	return true;
 }
 



CVS commit: src/lib/librt

2013-12-20 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Fri Dec 20 13:48:46 UTC 2013

Modified Files:
src/lib/librt: shm_open.3

Log Message:
Sort errors.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/lib/librt/shm_open.3

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/librt/shm_open.3
diff -u src/lib/librt/shm_open.3:1.1 src/lib/librt/shm_open.3:1.2
--- src/lib/librt/shm_open.3:1.1	Thu Dec 19 19:40:08 2013
+++ src/lib/librt/shm_open.3	Fri Dec 20 13:48:45 2013
@@ -1,4 +1,4 @@
-.\ $NetBSD: shm_open.3,v 1.1 2013/12/19 19:40:08 rmind Exp $
+.\ $NetBSD: shm_open.3,v 1.2 2013/12/20 13:48:45 wiz Exp $
 .\
 .\ Copyright 2000 Massachusetts Institute of Technology
 .\
@@ -161,6 +161,17 @@ contents, persist across reboots.
 The following errors are defined for
 .Fn shm_open :
 .Bl -tag -width Er
+.It Bq Er EACCES
+The required permissions (for reading or reading and writing) are denied.
+.It Bq Er EEXIST
+.Dv O_CREAT
+and
+.Dv O_EXCL
+are specified and the named shared memory object does exist.
+.It Bq Er EFAULT
+The
+.Fa path
+argument points outside the process' allocated address space.
 .It Bq Er EINVAL
 A flag other than
 .Dv O_RDONLY ,
@@ -170,25 +181,20 @@ A flag other than
 or
 .Dv O_TRUNC
 was included in
-.Fa flags .
+.Fa flags ;
+or the
+.Fa path
+does not begin with a slash
+.Pq Ql \/
+character.
 .It Bq Er EMFILE
 The process has already reached its limit for open file descriptors.
-.It Bq Er ENFILE
-The system file table is full.
-.It Bq Er EFAULT
-The
-.Fa path
-argument points outside the process' allocated address space.
 .It Bq Er ENAMETOOLONG
 The entire pathname exceeded
 .Brq Dv PATH_MAX
 characters.
-.It Bq Er EINVAL
-The
-.Fa path
-does not begin with a slash
-.Pq Ql \/
-character.
+.It Bq Er ENFILE
+The system file table is full.
 .It Bq Er ENOENT
 .Dv O_CREAT
 is specified and the named shared memory object does not exist.
@@ -196,18 +202,15 @@ is specified and the named shared memory
 Not supported, most likely due to missing or incorrect
 .Pa /var/shm
 mount.
-.It Bq Er EEXIST
-.Dv O_CREAT
-and
-.Dv O_EXCL
-are specified and the named shared memory object does exist.
-.It Bq Er EACCES
-The required permissions (for reading or reading and writing) are denied.
 .El
 .Pp
 The following errors are defined for
 .Fn shm_unlink :
 .Bl -tag -width Er
+.It Bq Er EACCES
+The required permissions are denied.
+.Fn shm_unlink
+requires write permission to the shared memory object.
 .It Bq Er EFAULT
 The
 .Fa path
@@ -218,10 +221,6 @@ The entire pathname exceeded
 characters.
 .It Bq Er ENOENT
 The named shared memory object does not exist.
-.It Bq Er EACCES
-The required permissions are denied.
-.Fn shm_unlink
-requires write permission to the shared memory object.
 .El
 .Sh SEE ALSO
 .Xr close 2 ,



CVS commit: src/lib/librt

2013-12-20 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Fri Dec 20 13:48:46 UTC 2013

Modified Files:
src/lib/librt: shm_open.3

Log Message:
Sort errors.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/lib/librt/shm_open.3

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/lib/librt

2012-07-06 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Sat Jul  7 01:37:13 UTC 2012

Modified Files:
src/lib/librt: sem_init.3

Log Message:
Shared semaphores have been supported since the initial version, so drop
obsolete restriction.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/lib/librt/sem_init.3

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/librt/sem_init.3
diff -u src/lib/librt/sem_init.3:1.2 src/lib/librt/sem_init.3:1.3
--- src/lib/librt/sem_init.3:1.2	Thu Mar  8 21:59:29 2012
+++ src/lib/librt/sem_init.3	Sat Jul  7 01:37:12 2012
@@ -1,4 +1,4 @@
-.\ $NetBSD: sem_init.3,v 1.2 2012/03/08 21:59:29 joerg Exp $
+.\ $NetBSD: sem_init.3,v 1.3 2012/07/07 01:37:12 joerg Exp $
 .\
 .\ Copyright (C) 2000 Jason Evans jas...@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 February 29, 2012
+.Dd July 7, 2012
 .Dt SEM_INIT 3
 .Os
 .Sh NAME
@@ -88,14 +88,3 @@ Unable to initialize a shared semaphore.
 .Fn sem_init
 conforms to
 .St -p1003.1-96 .
-.Pp
-This implementation does not support shared semaphores, and reports this fact
-by setting
-.Va errno
-to
-.Er EPERM .
-This is perhaps a stretch of the intention of POSIX, but is
-compliant, with the caveat that
-.Fn sem_init
-always reports a permissions error when an attempt to create a shared semaphore
-is made.



CVS commit: src/lib/librt

2012-07-06 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Sat Jul  7 01:39:59 UTC 2012

Modified Files:
src/lib/librt: sem_init.3

Log Message:
One more reference to unimplemented shared semaphores.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/lib/librt/sem_init.3

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/librt/sem_init.3
diff -u src/lib/librt/sem_init.3:1.3 src/lib/librt/sem_init.3:1.4
--- src/lib/librt/sem_init.3:1.3	Sat Jul  7 01:37:12 2012
+++ src/lib/librt/sem_init.3	Sat Jul  7 01:39:59 2012
@@ -1,4 +1,4 @@
-.\ $NetBSD: sem_init.3,v 1.3 2012/07/07 01:37:12 joerg Exp $
+.\ $NetBSD: sem_init.3,v 1.4 2012/07/07 01:39:59 joerg Exp $
 .\
 .\ Copyright (C) 2000 Jason Evans jas...@freebsd.org.
 .\ All rights reserved.
@@ -48,8 +48,7 @@ to have the value
 .Fa value .
 A non-zero value for
 .Fa pshared
-specifies a shared semaphore that can be used by multiple processes, which this
-implementation is not capable of.
+specifies a shared semaphore that can be used by multiple processes.
 .Pp
 Following a successful call to
 .Fn sem_init ,



CVS commit: src/lib/librt

2012-07-06 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Sat Jul  7 01:37:13 UTC 2012

Modified Files:
src/lib/librt: sem_init.3

Log Message:
Shared semaphores have been supported since the initial version, so drop
obsolete restriction.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/lib/librt/sem_init.3

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/lib/librt

2012-07-06 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Sat Jul  7 01:39:59 UTC 2012

Modified Files:
src/lib/librt: sem_init.3

Log Message:
One more reference to unimplemented shared semaphores.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/lib/librt/sem_init.3

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/lib/librt

2012-03-10 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Sat Mar 10 19:59:21 UTC 2012

Modified Files:
src/lib/librt: sem.c

Log Message:
Keep in sync with libpthread: Fix error handling.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/lib/librt/sem.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/librt/sem.c
diff -u src/lib/librt/sem.c:1.6 src/lib/librt/sem.c:1.7
--- src/lib/librt/sem.c:1.6	Thu Mar  8 21:59:29 2012
+++ src/lib/librt/sem.c	Sat Mar 10 19:59:21 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: sem.c,v 1.6 2012/03/08 21:59:29 joerg Exp $	*/
+/*	$NetBSD: sem.c,v 1.7 2012/03/10 19:59:21 joerg Exp $	*/
 
 /*-
  * Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -59,7 +59,7 @@
  */
 
 #include sys/cdefs.h
-__RCSID($NetBSD: sem.c,v 1.6 2012/03/08 21:59:29 joerg Exp $);
+__RCSID($NetBSD: sem.c,v 1.7 2012/03/10 19:59:21 joerg Exp $);
 
 /*
  * If an application is linked against both librt and libpthread, the
@@ -163,6 +163,7 @@ sem_init(sem_t *sem, int pshared, unsign
 int
 sem_destroy(sem_t *sem)
 {
+	int error, save_errno;
 
 #ifdef ERRORCHECK
 	if (sem == NULL || *sem == NULL || (*sem)-ksem_magic != KSEM_MAGIC) {
@@ -171,12 +172,12 @@ sem_destroy(sem_t *sem)
 	}
 #endif
 
-	if (_ksem_destroy((*sem)-ksem_semid) == -1)
-		return (-1);
-
+	error = _ksem_destroy((*sem)-ksem_semid);
+	save_errno = errno;
 	sem_free(*sem);
+	errno = save_errno;
 
-	return (0);
+	return error;
 }
 
 sem_t *
@@ -241,6 +242,7 @@ sem_open(const char *name, int oflag, ..
 int
 sem_close(sem_t *sem)
 {
+	int error, save_errno;
 
 #ifdef ERRORCHECK
 	if (sem == NULL || *sem == NULL || (*sem)-ksem_magic != KSEM_MAGIC) {
@@ -249,13 +251,14 @@ sem_close(sem_t *sem)
 	}
 #endif
 
-	if (_ksem_close((*sem)-ksem_semid) == -1)
-		return (-1);
+	error = _ksem_close((*sem)-ksem_semid);
 
 	LIST_REMOVE((*sem), ksem_list);
+	save_errno = errno;
 	sem_free(*sem);
 	free(sem);
-	return (0);
+	errno = save_errno;
+	return error;
 }
 
 int



CVS commit: src/lib/librt

2012-03-10 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Sat Mar 10 19:59:21 UTC 2012

Modified Files:
src/lib/librt: sem.c

Log Message:
Keep in sync with libpthread: Fix error handling.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/lib/librt/sem.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/lib/librt

2012-03-08 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Thu Mar  8 22:12:37 UTC 2012

Modified Files:
src/lib/librt: sem_getvalue.3

Log Message:
Add missing comma.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/lib/librt/sem_getvalue.3

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/librt/sem_getvalue.3
diff -u src/lib/librt/sem_getvalue.3:1.3 src/lib/librt/sem_getvalue.3:1.4
--- src/lib/librt/sem_getvalue.3:1.3	Thu Mar  8 21:59:29 2012
+++ src/lib/librt/sem_getvalue.3	Thu Mar  8 22:12:37 2012
@@ -1,4 +1,4 @@
-.\ $NetBSD: sem_getvalue.3,v 1.3 2012/03/08 21:59:29 joerg Exp $
+.\ $NetBSD: sem_getvalue.3,v 1.4 2012/03/08 22:12:37 wiz Exp $
 .\
 .\ Copyright (C) 2000 Jason Evans jas...@freebsd.org.
 .\ All rights reserved.
@@ -61,7 +61,7 @@ points to an invalid semaphore.
 .El
 .Sh SEE ALSO
 .Xr sem_post 3 ,
-.Xr sem_timedwait 3
+.Xr sem_timedwait 3 ,
 .Xr sem_trywait 3 ,
 .Xr sem_wait 3
 .Sh STANDARDS



CVS commit: src/lib/librt

2012-03-08 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Thu Mar  8 22:12:52 UTC 2012

Modified Files:
src/lib/librt: sem_open.3

Log Message:
Merge error descriptions for same error code.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/lib/librt/sem_open.3

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/librt/sem_open.3
diff -u src/lib/librt/sem_open.3:1.5 src/lib/librt/sem_open.3:1.6
--- src/lib/librt/sem_open.3:1.5	Thu Mar  8 21:59:29 2012
+++ src/lib/librt/sem_open.3	Thu Mar  8 22:12:52 2012
@@ -1,4 +1,4 @@
-.\ $NetBSD: sem_open.3,v 1.5 2012/03/08 21:59:29 joerg Exp $
+.\ $NetBSD: sem_open.3,v 1.6 2012/03/08 22:12:52 wiz Exp $
 .\
 .\ Copyright (C) 2000 Jason Evans jas...@freebsd.org.
 .\ All rights reserved.
@@ -140,9 +140,8 @@ function will fail if:
 .It Bq Er EACCES
 The semaphore exists and the permissions specified by
 .Fa oflag
-at the time it was created deny access to this process.
-.It Bq Er EACCES
-The semaphore does not exist, but permission to create it is denied.
+at the time it was created deny access to this process;
+or the semaphore does not exist, but permission to create it is denied.
 .It Bq Er EEXIST
 .Dv O_CREAT
 and
@@ -154,9 +153,8 @@ The call was interrupted by a signal.
 The
 .Fn sem_open
 operation is not supported for the given
-.Fa name .
-.It Bq Er EINVAL
-The
+.Fa name ;
+or the
 .Fa value
 argument is greater than
 .Dv SEM_VALUE_MAX .



CVS commit: src/lib/librt

2012-03-08 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Thu Mar  8 22:13:05 UTC 2012

Modified Files:
src/lib/librt: sem_post.3

Log Message:
Whitespace nits.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/lib/librt/sem_post.3

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/librt/sem_post.3
diff -u src/lib/librt/sem_post.3:1.2 src/lib/librt/sem_post.3:1.3
--- src/lib/librt/sem_post.3:1.2	Thu Mar  8 21:59:29 2012
+++ src/lib/librt/sem_post.3	Thu Mar  8 22:13:05 2012
@@ -1,4 +1,4 @@
-.\ $NetBSD: sem_post.3,v 1.2 2012/03/08 21:59:29 joerg Exp $
+.\ $NetBSD: sem_post.3,v 1.3 2012/03/08 22:13:05 wiz Exp $
 .\
 .\ Copyright (C) 2000 Jason Evans jas...@freebsd.org.
 .\ All rights reserved.
@@ -48,9 +48,9 @@ If there are threads blocked on the sema
 .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.
+.Fn sem_timedwait .
 .Pp
 .Fn sem_post
 is signal-reentrant and may be called within signal handlers.



CVS commit: src/lib/librt

2012-03-08 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Thu Mar  8 22:13:32 UTC 2012

Modified Files:
src/lib/librt: sem_wait.3

Log Message:
Add sem_timedwait to NAME and fix SYNOPSIS. Add serial comma.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/lib/librt/sem_wait.3

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/librt/sem_wait.3
diff -u src/lib/librt/sem_wait.3:1.2 src/lib/librt/sem_wait.3:1.3
--- src/lib/librt/sem_wait.3:1.2	Thu Mar  8 21:59:29 2012
+++ src/lib/librt/sem_wait.3	Thu Mar  8 22:13:32 2012
@@ -1,4 +1,4 @@
-.\ $NetBSD: sem_wait.3,v 1.2 2012/03/08 21:59:29 joerg Exp $
+.\ $NetBSD: sem_wait.3,v 1.3 2012/03/08 22:13:32 wiz Exp $
 .\
 .\ Copyright (C) 2000 Jason Evans jas...@freebsd.org.
 .\ All rights reserved.
@@ -32,6 +32,7 @@
 .Os
 .Sh NAME
 .Nm sem_wait ,
+.Nm sem_timedwait ,
 .Nm sem_trywait
 .Nd decrement (lock) a semaphore
 .Sh LIBRARY
@@ -41,7 +42,7 @@
 .Ft int
 .Fn sem_wait sem_t *sem
 .Ft int
-.Fn sem_wait sem_t *sem const struct timespec * restrict abstime
+.Fn sem_timedwait sem_t *sem const struct timespec * restrict abstime
 .Ft int
 .Fn sem_trywait sem_t *sem
 .Sh DESCRIPTION
@@ -71,7 +72,7 @@ Otherwise, the semaphore is not decremen
 .Rv -std sem_wait
 .Sh ERRORS
 .Fn sem_wait ,
-.Fn sem_timedwait
+.Fn sem_timedwait ,
 and
 .Fn sem_trywait
 will fail if:



CVS commit: src/lib/librt

2012-03-08 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Thu Mar  8 22:12:37 UTC 2012

Modified Files:
src/lib/librt: sem_getvalue.3

Log Message:
Add missing comma.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/lib/librt/sem_getvalue.3

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/lib/librt

2012-03-08 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Thu Mar  8 22:12:52 UTC 2012

Modified Files:
src/lib/librt: sem_open.3

Log Message:
Merge error descriptions for same error code.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/lib/librt/sem_open.3

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/lib/librt

2012-03-08 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Thu Mar  8 22:13:05 UTC 2012

Modified Files:
src/lib/librt: sem_post.3

Log Message:
Whitespace nits.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/lib/librt/sem_post.3

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/lib/librt

2012-03-08 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Thu Mar  8 22:13:32 UTC 2012

Modified Files:
src/lib/librt: sem_wait.3

Log Message:
Add sem_timedwait to NAME and fix SYNOPSIS. Add serial comma.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/lib/librt/sem_wait.3

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/lib/librt

2011-10-27 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Oct 27 18:45:44 UTC 2011

Modified Files:
src/lib/librt: Makefile

Log Message:
Add the same ppc64 hack that libposix needs.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/lib/librt/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/librt/Makefile
diff -u src/lib/librt/Makefile:1.13 src/lib/librt/Makefile:1.14
--- src/lib/librt/Makefile:1.13	Mon Jun  7 03:26:21 2010
+++ src/lib/librt/Makefile	Thu Oct 27 14:45:44 2011
@@ -1,7 +1,9 @@
-#	$NetBSD: Makefile,v 1.13 2010/06/07 07:26:21 jruoho Exp $
+#	$NetBSD: Makefile,v 1.14 2011/10/27 18:45:44 christos Exp $
 #
 
-WARNS=	2
+.include bsd.own.mk
+
+WARNS=	4
 
 LIB=	rt
 SRCS=	sem.c
@@ -37,7 +39,6 @@ MLINKS+=	sched.3 sched_get_priority_min.
 MLINKS+=	sched.3 sched_rr_get_interval.3
 MLINKS+=	sched.3 sched_yield.3
 
-.include bsd.own.mk
 
 .include ${.CURDIR}/../libc/libcincludes.mk
 
@@ -45,4 +46,11 @@ AFLAGS+=-I${ARCHDIR}
 
 .include ${.CURDIR}/sys/Makefile.inc
 
+.if ${MACHINE_ARCH} == powerpc64
+# XXX: How come it does not resolve from libc?
+CPPFLAGS+=-I${NETBSDSRCDIR}/lib/libc/include
+.PATH.c: ${NETBSDSRCDIR}/lib/libc/gen
+SRCS+= _errno.c
+.endif
+
 .include bsd.lib.mk



CVS commit: src/lib/librt

2011-10-27 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Oct 27 18:45:44 UTC 2011

Modified Files:
src/lib/librt: Makefile

Log Message:
Add the same ppc64 hack that libposix needs.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/lib/librt/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/lib/librt

2011-08-13 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sat Aug 13 11:10:31 UTC 2011

Modified Files:
src/lib/librt: aio_return.3

Log Message:
aio_return returns ssize_t not int


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/lib/librt/aio_return.3

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/librt/aio_return.3
diff -u src/lib/librt/aio_return.3:1.4 src/lib/librt/aio_return.3:1.5
--- src/lib/librt/aio_return.3:1.4	Mon May 17 19:22:31 2010
+++ src/lib/librt/aio_return.3	Sat Aug 13 11:10:31 2011
@@ -1,4 +1,4 @@
-.\ $NetBSD: aio_return.3,v 1.4 2010/05/17 19:22:31 jruoho Exp $
+.\ $NetBSD: aio_return.3,v 1.5 2011/08/13 11:10:31 jmcneill Exp $
 .\
 .\ Copyright (c) 1999 Softweyr LLC.
 .\ All rights reserved.
@@ -26,7 +26,7 @@
 .\
 .\ $FreeBSD: /repoman/r/ncvs/src/lib/libc/sys/aio_return.2,v 1.19 2006/10/07 10:49:20 trhodes Exp $
 .\
-.Dd May 17, 2010
+.Dd August 13, 2011
 .Dt AIO_RETURN 3
 .Os
 .Sh NAME
@@ -36,7 +36,7 @@
 .Lb librt
 .Sh SYNOPSIS
 .In aio.h
-.Ft int
+.Ft ssize_t
 .Fn aio_return struct aiocb *aiocbp
 .Sh DESCRIPTION
 The



CVS commit: src/lib/librt

2011-08-12 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Fri Aug 12 21:18:51 UTC 2011

Modified Files:
src/lib/librt: lio_listio.3

Log Message:
Add sigevent(3) to SEE ALSO


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/lib/librt/lio_listio.3

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/librt/lio_listio.3
diff -u src/lib/librt/lio_listio.3:1.3 src/lib/librt/lio_listio.3:1.4
--- src/lib/librt/lio_listio.3:1.3	Mon May 17 19:22:31 2010
+++ src/lib/librt/lio_listio.3	Fri Aug 12 21:18:51 2011
@@ -1,4 +1,4 @@
-.\ $NetBSD: lio_listio.3,v 1.3 2010/05/17 19:22:31 jruoho Exp $
+.\ $NetBSD: lio_listio.3,v 1.4 2011/08/12 21:18:51 apb Exp $
 .\
 .\ Copyright (c) 2003 Tim J. Robbins
 .\ All rights reserved.
@@ -26,7 +26,7 @@
 .\
 .\ $FreeBSD: /repoman/r/ncvs/src/lib/libc/sys/lio_listio.2,v 1.6 2006/10/07 05:13:32 trhodes Exp $
 .\
-.Dd May 17, 2010
+.Dd August 12, 2011
 .Dt LIO_LISTIO 3
 .Os
 .Sh NAME
@@ -164,7 +164,8 @@
 .Xr read 2 ,
 .Xr siginfo 2 ,
 .Xr write 2 ,
-.Xr aio 3
+.Xr aio 3 ,
+.Xr sigevent 3
 .Sh STANDARDS
 The
 .Fn lio_listio



CVS commit: src/lib/librt

2011-08-12 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Fri Aug 12 23:40:43 UTC 2011

Modified Files:
src/lib/librt: lio_listio.3

Log Message:
Merge two entries for same error code.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/lib/librt/lio_listio.3

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/librt/lio_listio.3
diff -u src/lib/librt/lio_listio.3:1.4 src/lib/librt/lio_listio.3:1.5
--- src/lib/librt/lio_listio.3:1.4	Fri Aug 12 21:18:51 2011
+++ src/lib/librt/lio_listio.3	Fri Aug 12 23:40:43 2011
@@ -1,4 +1,4 @@
-.\ $NetBSD: lio_listio.3,v 1.4 2011/08/12 21:18:51 apb Exp $
+.\ $NetBSD: lio_listio.3,v 1.5 2011/08/12 23:40:43 wiz Exp $
 .\
 .\ Copyright (c) 2003 Tim J. Robbins
 .\ All rights reserved.
@@ -120,9 +120,8 @@
 function will fail if:
 .Bl -tag -width Er
 .It Bq Er EAGAIN
-There are not enough resources to enqueue the requests.
-.It Bq Er EAGAIN
-The request would cause the system-wide limit
+There are not enough resources to enqueue the requests; or
+the request would cause the system-wide limit
 .Dv AIO_MAX
 to be exceeded.
 .It Bq Er EINTR



CVS commit: src/lib/librt

2011-08-12 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Fri Aug 12 21:18:51 UTC 2011

Modified Files:
src/lib/librt: lio_listio.3

Log Message:
Add sigevent(3) to SEE ALSO


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/lib/librt/lio_listio.3

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/lib/librt

2011-08-12 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Fri Aug 12 23:40:43 UTC 2011

Modified Files:
src/lib/librt: lio_listio.3

Log Message:
Merge two entries for same error code.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/lib/librt/lio_listio.3

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/lib/librt

2011-04-25 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Mon Apr 25 23:14:33 UTC 2011

Modified Files:
src/lib/librt: sched.3

Log Message:
Sort sections.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/lib/librt/sched.3

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/librt/sched.3
diff -u src/lib/librt/sched.3:1.9 src/lib/librt/sched.3:1.10
--- src/lib/librt/sched.3:1.9	Thu May  6 10:49:53 2010
+++ src/lib/librt/sched.3	Mon Apr 25 23:14:33 2011
@@ -1,4 +1,4 @@
-.\	$NetBSD: sched.3,v 1.9 2010/05/06 10:49:53 jruoho Exp $
+.\	$NetBSD: sched.3,v 1.10 2011/04/25 23:14:33 wiz Exp $
 .\
 .\ Copyright (c) 2008 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -147,6 +147,12 @@
 into the
 .Fa cpuset .
 .El
+.Sh IMPLEMENTATION NOTES
+Portable applications should not use the
+.Fn sched_setaffinity_np
+and
+.Fn sched_getaffinity_np
+functions.
 .Sh RETURN VALUES
 .Fn sched_setparam ,
 .Fn sched_getparam ,
@@ -242,12 +248,6 @@
 .Fa pid
 is not zero.
 .El
-.Sh IMPLEMENTATION NOTES
-Portable applications should not use the
-.Fn sched_setaffinity_np
-and
-.Fn sched_getaffinity_np
-functions.
 .Sh SEE ALSO
 .Xr affinity 3 ,
 .Xr cpuset 3 ,



CVS commit: src/lib/librt

2011-04-25 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Mon Apr 25 23:14:33 UTC 2011

Modified Files:
src/lib/librt: sched.3

Log Message:
Sort sections.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/lib/librt/sched.3

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/lib/librt

2011-01-06 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Thu Jan  6 15:22:21 UTC 2011

Modified Files:
src/lib/librt: aio_suspend.3

Log Message:
Fix macro (DV - Dv).


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/lib/librt/aio_suspend.3

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/librt/aio_suspend.3
diff -u src/lib/librt/aio_suspend.3:1.4 src/lib/librt/aio_suspend.3:1.5
--- src/lib/librt/aio_suspend.3:1.4	Mon May 17 19:22:31 2010
+++ src/lib/librt/aio_suspend.3	Thu Jan  6 15:22:20 2011
@@ -1,4 +1,4 @@
-.\ $NetBSD: aio_suspend.3,v 1.4 2010/05/17 19:22:31 jruoho Exp $
+.\ $NetBSD: aio_suspend.3,v 1.5 2011/01/06 15:22:20 njoly Exp $
 .\
 .\ Copyright (c) 1999 Softweyr LLC.
 .\ All rights reserved.
@@ -67,7 +67,7 @@
 If
 .Fa timeout
 is a
-.DV NULL
+.Dv NULL
 pointer, the suspend blocks indefinitely.
 To effect a poll, the
 .Fa timeout



CVS commit: src/lib/librt

2011-01-06 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Thu Jan  6 15:22:21 UTC 2011

Modified Files:
src/lib/librt: aio_suspend.3

Log Message:
Fix macro (DV - Dv).


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/lib/librt/aio_suspend.3

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/lib/librt

2010-09-15 Thread YAMAMOTO Takashi
Module Name:src
Committed By:   yamt
Date:   Wed Sep 15 07:28:46 UTC 2010

Modified Files:
src/lib/librt: aio_cancel.3 aio_fsync.3

Log Message:
remove RESTRICTIONS section, which seems unrelated to our implementation


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/lib/librt/aio_cancel.3
cvs rdiff -u -r1.6 -r1.7 src/lib/librt/aio_fsync.3

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/lib/librt

2010-06-07 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Mon Jun  7 07:21:52 UTC 2010

Modified Files:
src/lib/librt: mq_close.3 mq_getattr.3 mq_notify.3 mq_open.3
mq_receive.3 mq_send.3 mq_setattr.3 mq_unlink.3

Log Message:
Mostly refer to the main page, mq(3), in SEE ALSO.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/lib/librt/mq_close.3 src/lib/librt/mq_getattr.3 \
src/lib/librt/mq_notify.3 src/lib/librt/mq_setattr.3 \
src/lib/librt/mq_unlink.3
cvs rdiff -u -r1.4 -r1.5 src/lib/librt/mq_open.3
cvs rdiff -u -r1.2 -r1.3 src/lib/librt/mq_receive.3 src/lib/librt/mq_send.3

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/librt/mq_close.3
diff -u src/lib/librt/mq_close.3:1.1 src/lib/librt/mq_close.3:1.2
--- src/lib/librt/mq_close.3:1.1	Mon Jan  5 21:19:49 2009
+++ src/lib/librt/mq_close.3	Mon Jun  7 07:21:52 2010
@@ -1,8 +1,8 @@
-.\	$NetBSD: mq_close.3,v 1.1 2009/01/05 21:19:49 rmind Exp $
+.\	$NetBSD: mq_close.3,v 1.2 2010/06/07 07:21:52 jruoho Exp $
 .\
 .\ Copyright (c) 2001-2003 The Open Group, All Rights Reserved
 .\
-.Dd January 5, 2009
+.Dd June 7, 2010
 .Dt MQ_CLOSE 3
 .Os
 .Sh NAME
@@ -39,12 +39,8 @@
 argument is not a valid message queue descriptor.
 .El
 .Sh SEE ALSO
-.Xr mq_getattr 3 ,
-.Xr mq_notify 3 ,
+.Xr mq 3 ,
 .Xr mq_open 3 ,
-.Xr mq_receive 3 ,
-.Xr mq_send 3 ,
-.Xr mq_setattr 3 ,
 .Xr mq_unlink 3
 .Sh STANDARDS
 This function conforms to the
Index: src/lib/librt/mq_getattr.3
diff -u src/lib/librt/mq_getattr.3:1.1 src/lib/librt/mq_getattr.3:1.2
--- src/lib/librt/mq_getattr.3:1.1	Mon Jan  5 21:19:49 2009
+++ src/lib/librt/mq_getattr.3	Mon Jun  7 07:21:52 2010
@@ -1,8 +1,8 @@
-.\	$NetBSD: mq_getattr.3,v 1.1 2009/01/05 21:19:49 rmind Exp $
+.\	$NetBSD: mq_getattr.3,v 1.2 2010/06/07 07:21:52 jruoho Exp $
 .\
 .\ Copyright (c) 2001-2003 The Open Group, All Rights Reserved
 .\
-.Dd January 5, 2009
+.Dd June 7, 2010
 .Dt MQ_GETATTR 3
 .Os
 .Sh NAME
@@ -63,13 +63,8 @@
 The mqdes argument is not a valid message queue descriptor.
 .El
 .Sh SEE ALSO
-.Xr mq_close 3 ,
-.Xr mq_notify 3 ,
-.Xr mq_open 3 ,
-.Xr mq_receive 3 ,
-.Xr mq_send 3 ,
-.Xr mq_setattr 3 ,
-.Xr mq_unlink 3
+.Xr mq 3 ,
+.Xr mq_setattr 3
 .Sh STANDARDS
 This function conforms to the
 .St -p1003.1-2001
Index: src/lib/librt/mq_notify.3
diff -u src/lib/librt/mq_notify.3:1.1 src/lib/librt/mq_notify.3:1.2
--- src/lib/librt/mq_notify.3:1.1	Mon Jan  5 21:19:49 2009
+++ src/lib/librt/mq_notify.3	Mon Jun  7 07:21:52 2010
@@ -1,8 +1,8 @@
-.\	$NetBSD: mq_notify.3,v 1.1 2009/01/05 21:19:49 rmind Exp $
+.\	$NetBSD: mq_notify.3,v 1.2 2010/06/07 07:21:52 jruoho Exp $
 .\
 .\ Copyright (c) 2001-2003 The Open Group, All Rights Reserved
 .\
-.Dd January 5, 2009
+.Dd June 7, 2010
 .Dt MQ_NOTIFY 3
 .Os
 .Sh NAME
@@ -67,13 +67,8 @@
 A process is already registered for notification by the message queue.
 .El
 .Sh SEE ALSO
-.Xr mq_close 3 ,
-.Xr mq_getattr 3 ,
-.Xr mq_open 3 ,
-.Xr mq_receive 3 ,
-.Xr mq_send 3 ,
-.Xr mq_setattr 3 ,
-.Xr mq_unlink 3
+.Xr mq 3 ,
+.Xr sigevent 3
 .Sh STANDARDS
 This function conforms to the
 .St -p1003.1-2001
Index: src/lib/librt/mq_setattr.3
diff -u src/lib/librt/mq_setattr.3:1.1 src/lib/librt/mq_setattr.3:1.2
--- src/lib/librt/mq_setattr.3:1.1	Mon Jan  5 21:19:49 2009
+++ src/lib/librt/mq_setattr.3	Mon Jun  7 07:21:52 2010
@@ -1,8 +1,8 @@
-.\	$NetBSD: mq_setattr.3,v 1.1 2009/01/05 21:19:49 rmind Exp $
+.\	$NetBSD: mq_setattr.3,v 1.2 2010/06/07 07:21:52 jruoho Exp $
 .\
 .\ Copyright (c) 2001-2003 The Open Group, All Rights Reserved
 .\
-.Dd January 5, 2009
+.Dd June 7, 2010
 .Dt MQ_SETATTR 3
 .Os
 .Sh NAME
@@ -80,13 +80,8 @@
 argument is not a valid message queue descriptor.
 .El
 .Sh SEE ALSO
-.Xr mq_close 3 ,
-.Xr mq_getattr 3 ,
-.Xr mq_notify 3 ,
-.Xr mq_open 3 ,
-.Xr mq_receive 3 ,
-.Xr mq_send 3 ,
-.Xr mq_unlink 3
+.Xr mq 3 ,
+.Xr mq_getattr 3
 .Sh STANDARDS
 This function conforms to the
 .St -p1003.1-2001
Index: src/lib/librt/mq_unlink.3
diff -u src/lib/librt/mq_unlink.3:1.1 src/lib/librt/mq_unlink.3:1.2
--- src/lib/librt/mq_unlink.3:1.1	Mon Jan  5 21:19:49 2009
+++ src/lib/librt/mq_unlink.3	Mon Jun  7 07:21:52 2010
@@ -1,8 +1,8 @@
-.\	$NetBSD: mq_unlink.3,v 1.1 2009/01/05 21:19:49 rmind Exp $
+.\	$NetBSD: mq_unlink.3,v 1.2 2010/06/07 07:21:52 jruoho Exp $
 .\
 .\ Copyright (c) 2001-2003 The Open Group, All Rights Reserved
 .\
-.Dd January 5, 2009
+.Dd June 7, 2009
 .Dt MQ_UNLINK 3
 .Os
 .Sh NAME
@@ -67,13 +67,8 @@
 The named message queue does not exist.
 .El
 .Sh SEE ALSO
-.Xr mq_close 3 ,
-.Xr mq_getattr 3 ,
-.Xr mq_notify 3 ,
-.Xr mq_open 3 ,
-.Xr mq_receive 3 ,
-.Xr mq_send 3 ,
-.Xr mq_setattr 3
+.Xr mq_3 ,
+.Xr mq_open 3
 .Sh STANDARDS
 This function conforms to the
 .St -p1003.1-2001

Index: src/lib/librt/mq_open.3
diff -u src/lib/librt/mq_open.3:1.4 src/lib/librt/mq_open.3:1.5
--- src/lib/librt/mq_open.3:1.4	Fri May 14 08:30:34 2010
+++ src/lib/librt/mq_open.3	

CVS commit: src/lib/librt

2010-06-07 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Mon Jun  7 07:39:43 UTC 2010

Modified Files:
src/lib/librt: mq.3

Log Message:
Remove some leftover .\ comments.

The sysctl variables will be described in sysctl(7).


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/lib/librt/mq.3

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/librt/mq.3
diff -u src/lib/librt/mq.3:1.1 src/lib/librt/mq.3:1.2
--- src/lib/librt/mq.3:1.1	Mon Jun  7 07:11:28 2010
+++ src/lib/librt/mq.3	Mon Jun  7 07:39:43 2010
@@ -1,4 +1,4 @@
-.\ $NetBSD: mq.3,v 1.1 2010/06/07 07:11:28 jruoho Exp $
+.\ $NetBSD: mq.3,v 1.2 2010/06/07 07:39:43 jruoho Exp $
 .\
 .\ Copyright (c) 2010 Jukka Ruohonen jruoho...@iki.fi
 .\
@@ -226,9 +226,6 @@
 the message queue has been created,
 the resource limits cannot be changed
 by an user once the queue has been created.
-.\ The super user can however control the limits via few
-.\ .Xr sysctl 7
-.\ variables.
 To avoid blocking in case the maximum number of messages has been reached, the
 .Dv O_NONBLOCK
 flag can be set as an argument to
@@ -291,31 +288,6 @@
 The process scheduling interface described in
 .Xr sched 3
 can be mentioned as an example.
-.\
-.\ XXX: Move this to sysctl(7).
-.\
-.\ .Sh SYSCTL
-.\ The
-.\ .Nx
-.\ implementation defines few
-.\ .Xr sysctl 8
-.\ variables available for the superuser.
-.\ .Bl -tag -width kern.mq_max_msgsize -offset indent
-.\ .It kern.posix_msg
-.\ The version of the
-.\ .Tn POSIX
-.\ standard to which the system attempts
-.\ to conform with respect to the message queues.
-.\ .It kern.mq_open_max
-.\ The maximum number of message queue descriptors
-.\ that any process is able to open.
-.\ .It kern.mq_prio_max
-.\ The maximum priority of any message.
-.\ .It kern.mq_max_msgsize
-.\ The maximum size of any message.
-.\ .It kern.mq_def_maxmsg
-.\ The default number of messages in a message queue.
-.\ .El
 .Sh FUNCTIONS
 The following functions are available in the
 .Tn API.
@@ -332,20 +304,6 @@
 .It Xr mq_setattr 3 Ta set message queue attributes
 .It Xr mq_notify 3 Ta register asynchronous notify
 .El
-.\
-.\ XXX: Fill this with fileops?
-.\
-.\ .In addition, the
-.\ .Nx
-.\ implementation allows the following standard
-.\ .Tn I/O
-.\ and file manipulation calls to be used with message queues:
-.\ The following functions are available in the
-.\ .Tn API.
-.\ .Bl -column -offset indent mq_timedreceive  XXX
-.\ .It Sy Function Ta Sy Description
-.\ .It Xr ...
-.\ .El
 .Sh COMPATIBILITY
 Despite of some early fears, the
 .Tn POSIX



CVS commit: src/lib/librt

2010-06-07 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Mon Jun  7 16:33:45 UTC 2010

Modified Files:
src/lib/librt: mq.3

Log Message:
Grammar and spacing fixes.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/lib/librt/mq.3

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/librt/mq.3
diff -u src/lib/librt/mq.3:1.2 src/lib/librt/mq.3:1.3
--- src/lib/librt/mq.3:1.2	Mon Jun  7 07:39:43 2010
+++ src/lib/librt/mq.3	Mon Jun  7 16:33:45 2010
@@ -1,4 +1,4 @@
-.\ $NetBSD: mq.3,v 1.2 2010/06/07 07:39:43 jruoho Exp $
+.\ $NetBSD: mq.3,v 1.3 2010/06/07 16:33:45 wiz Exp $
 .\
 .\ Copyright (c) 2010 Jukka Ruohonen jruoho...@iki.fi
 .\
@@ -51,7 +51,6 @@
 .Xr ipcs 1
 or
 .Xr msgget 2 ) .
-.Pp
 .Ss Rationale
 The rationale behind
 .Nm
@@ -116,7 +115,7 @@
 .Dq message queue descriptor .
 In the
 .Nx
-implementation this is actuallly an ordinary file descriptor.
+implementation this is actually an ordinary file descriptor.
 This means that it is possible, but not portable, to
 monitor a message queue descriptor by using
 .Xr poll 2
@@ -124,7 +123,7 @@
 .Xr select 2 .
 .Pp
 Message queues are named by character
-strings that represents (absolute) pathnames.
+strings that represent (absolute) pathnames.
 The used interface is analogous to the conventional file concepts.
 But unlike
 .Tn FIFOs
@@ -290,7 +289,7 @@
 can be mentioned as an example.
 .Sh FUNCTIONS
 The following functions are available in the
-.Tn API.
+.Tn API .
 .Bl -column -offset indent mq_timedreceive  XXX
 .It Sy Function Ta Sy Description
 .It Xr mq_open 3 Ta open a message queue



CVS commit: src/lib/librt

2010-06-07 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Mon Jun  7 16:37:07 UTC 2010

Modified Files:
src/lib/librt: mq_unlink.3

Log Message:
Fix xref.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/lib/librt/mq_unlink.3

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/librt/mq_unlink.3
diff -u src/lib/librt/mq_unlink.3:1.2 src/lib/librt/mq_unlink.3:1.3
--- src/lib/librt/mq_unlink.3:1.2	Mon Jun  7 07:21:52 2010
+++ src/lib/librt/mq_unlink.3	Mon Jun  7 16:37:07 2010
@@ -1,4 +1,4 @@
-.\	$NetBSD: mq_unlink.3,v 1.2 2010/06/07 07:21:52 jruoho Exp $
+.\	$NetBSD: mq_unlink.3,v 1.3 2010/06/07 16:37:07 wiz Exp $
 .\
 .\ Copyright (c) 2001-2003 The Open Group, All Rights Reserved
 .\
@@ -67,7 +67,7 @@
 The named message queue does not exist.
 .El
 .Sh SEE ALSO
-.Xr mq_3 ,
+.Xr mq 3 ,
 .Xr mq_open 3
 .Sh STANDARDS
 This function conforms to the



CVS commit: src/lib/librt

2010-06-07 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Mon Jun  7 07:21:52 UTC 2010

Modified Files:
src/lib/librt: mq_close.3 mq_getattr.3 mq_notify.3 mq_open.3
mq_receive.3 mq_send.3 mq_setattr.3 mq_unlink.3

Log Message:
Mostly refer to the main page, mq(3), in SEE ALSO.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/lib/librt/mq_close.3 src/lib/librt/mq_getattr.3 \
src/lib/librt/mq_notify.3 src/lib/librt/mq_setattr.3 \
src/lib/librt/mq_unlink.3
cvs rdiff -u -r1.4 -r1.5 src/lib/librt/mq_open.3
cvs rdiff -u -r1.2 -r1.3 src/lib/librt/mq_receive.3 src/lib/librt/mq_send.3

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/lib/librt

2010-06-07 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Mon Jun  7 07:39:43 UTC 2010

Modified Files:
src/lib/librt: mq.3

Log Message:
Remove some leftover .\ comments.

The sysctl variables will be described in sysctl(7).


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/lib/librt/mq.3

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/lib/librt

2010-06-07 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Mon Jun  7 16:33:45 UTC 2010

Modified Files:
src/lib/librt: mq.3

Log Message:
Grammar and spacing fixes.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/lib/librt/mq.3

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/lib/librt

2010-06-07 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Mon Jun  7 16:37:07 UTC 2010

Modified Files:
src/lib/librt: mq_unlink.3

Log Message:
Fix xref.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/lib/librt/mq_unlink.3

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/lib/librt

2010-05-19 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Wed May 19 06:35:20 UTC 2010

Modified Files:
src/lib/librt: aio.3

Log Message:
Remove the paragraph about the used notification mechanism. Instead,
reference sigevent(3). Clarify the file offset discussion.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/lib/librt/aio.3

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/librt/aio.3
diff -u src/lib/librt/aio.3:1.4 src/lib/librt/aio.3:1.5
--- src/lib/librt/aio.3:1.4	Mon May 17 19:22:31 2010
+++ src/lib/librt/aio.3	Wed May 19 06:35:20 2010
@@ -1,4 +1,4 @@
-.\ $NetBSD: aio.3,v 1.4 2010/05/17 19:22:31 jruoho Exp $ $
+.\ $NetBSD: aio.3,v 1.5 2010/05/19 06:35:20 jruoho Exp $ $
 .\
 .\ Copyright (c) 2010 Jukka Ruohonen jruoho...@iki.fi
 .\ All rights reserved.
@@ -24,7 +24,7 @@
 .\ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\ SUCH DAMAGE.
 .\
-.Dd May 17, 2010
+.Dd May 19, 2010
 .Dt AIO 3
 .Os
 .Sh NAME
@@ -184,10 +184,21 @@
 operations are not strictly sequential;
 operations are carried out in arbitrary order and more than one
 operation for one file descriptor can be started.
-Each operation must specify an offset, but the actual file offset
-is never updated as a result of an
+The requested read or write operation starts
+from the absolute position specified by
+.Va aio_offset ,
+as if
+.Xr lseek 2
+would have been called with
+.Dv SEEK_SET
+immediately prior to the operation.
+The
+.Tn POSIX
+standard does not specify what happens after an
 .Nm
-operation.
+operation has been successfully completed.
+Depending on the implementation,
+the actual file offset may or may not be updated.
 .Ss Errors and Completion
 Asynchronous
 .Tn I/O
@@ -244,37 +255,8 @@
 The notification model is implemented by using the
 .Va aio_sigevent
 member of the Asynchronous I/O Control Block.
-The structure
-.Em sigevent
-is defined in
-.In signal.h .
-The relevant fields for
-.Nm
-are
-.Va sigev_notify ,
-.Va sigev_signo ,
-and the function pointer
-.Va sigev_notify_function .
-The
-.Va sigev_notify
-member determines the type of the action:
-.Bl -enum -offset indent
-.It
-If it is
-.Dv SIGEV_NONE ,
-no notification is sent.
-.It
-If it is
-.Dv SIGEV_SIGNAL ,
-the signal determined by
-.Va sigev_signo
-is sent when the operation completes.
-.It
-If it is
-.Dv SIGEV_THREAD ,
-a thread is created which starts executing the function specified by
-.Va sigev_notify_function .
-.El
+The operational model and the used structure are described in
+.Xr sigevent 3 .
 .Pp
 The
 .Fn aio_suspend
@@ -351,9 +333,16 @@
 interface first appeared in
 .Nx 5.0 .
 .Sh CAVEATS
+Few limitations can be mentioned:
+.Bl -bullet
+.It
+Undefined behavior results if simultaneous asynchronous operations
+use the same Asynchronous I/O Control Block.
+.It
 When an asynchronous read operation is outstanding,
 undefined behavior may follow if the contents of
 .Va aiocb
 are altered, or if memory associated with the structure, or the
 .Va aio_buf
 buffer, is deallocated.
+.El



CVS commit: src/lib/librt

2010-05-19 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Wed May 19 06:35:20 UTC 2010

Modified Files:
src/lib/librt: aio.3

Log Message:
Remove the paragraph about the used notification mechanism. Instead,
reference sigevent(3). Clarify the file offset discussion.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/lib/librt/aio.3

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/lib/librt

2010-05-17 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Mon May 17 17:55:49 UTC 2010

Modified Files:
src/lib/librt: aio.3

Log Message:
Writing, rereading, writing, reareading, and yet still one typo.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/lib/librt/aio.3

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/librt/aio.3
diff -u src/lib/librt/aio.3:1.1 src/lib/librt/aio.3:1.2
--- src/lib/librt/aio.3:1.1	Mon May 17 17:15:42 2010
+++ src/lib/librt/aio.3	Mon May 17 17:55:49 2010
@@ -1,4 +1,4 @@
-.\ $NetBSD: aio.3,v 1.1 2010/05/17 17:15:42 jruoho Exp $ $
+.\ $NetBSD: aio.3,v 1.2 2010/05/17 17:55:49 jruoho Exp $ $
 .\
 .\ Copyright (c) 2010 Jukka Ruohonen jruoho...@iki.fi
 .\ All rights reserved.
@@ -40,7 +40,7 @@
 standard defines an interface for asynchronous input and output.
 Although in
 .Nx
-this this provided as part of the
+this provided as part of the
 .Lb librt ,
 the implementation largely resides in the kernel.
 .Ss Rationale



CVS commit: src/lib/librt

2010-05-17 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Mon May 17 19:22:31 UTC 2010

Modified Files:
src/lib/librt: aio.3 aio_cancel.3 aio_error.3 aio_fsync.3 aio_read.3
aio_return.3 aio_suspend.3 aio_write.3 lio_listio.3

Log Message:
Reference only aio(3) in SEE ALSO as it is the central placeholder. Note
timespec(3). Markup: -width Er (not -width Dv), .Dv NULL (not null), etc.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/lib/librt/aio.3 src/lib/librt/aio_cancel.3 \
src/lib/librt/aio_error.3 src/lib/librt/aio_read.3 \
src/lib/librt/aio_return.3 src/lib/librt/aio_suspend.3 \
src/lib/librt/aio_write.3
cvs rdiff -u -r1.5 -r1.6 src/lib/librt/aio_fsync.3
cvs rdiff -u -r1.2 -r1.3 src/lib/librt/lio_listio.3

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/librt/aio.3
diff -u src/lib/librt/aio.3:1.3 src/lib/librt/aio.3:1.4
--- src/lib/librt/aio.3:1.3	Mon May 17 19:04:55 2010
+++ src/lib/librt/aio.3	Mon May 17 19:22:31 2010
@@ -1,4 +1,4 @@
-.\ $NetBSD: aio.3,v 1.3 2010/05/17 19:04:55 jruoho Exp $ $
+.\ $NetBSD: aio.3,v 1.4 2010/05/17 19:22:31 jruoho Exp $ $
 .\
 .\ Copyright (c) 2010 Jukka Ruohonen jruoho...@iki.fi
 .\ All rights reserved.
@@ -220,9 +220,10 @@
 must be used to determine the status of the operation and to determine
 any error conditions.
 This includes the conditions reported by the standard
-.Xr read 2
+.Xr read 2 ,
+.Xr write 2 ,
 and
-.Xr write 2 .
+.Xr fsync 2 .
 The request remains enqueued and consumes process and
 system resources until
 .Fn aio_return
Index: src/lib/librt/aio_cancel.3
diff -u src/lib/librt/aio_cancel.3:1.3 src/lib/librt/aio_cancel.3:1.4
--- src/lib/librt/aio_cancel.3:1.3	Tue Aug  7 20:45:03 2007
+++ src/lib/librt/aio_cancel.3	Mon May 17 19:22:31 2010
@@ -1,4 +1,4 @@
-.\ $NetBSD: aio_cancel.3,v 1.3 2007/08/07 20:45:03 wiz Exp $
+.\ $NetBSD: aio_cancel.3,v 1.4 2010/05/17 19:22:31 jruoho Exp $
 .\
 .\ Copyright (c) 1999 Softweyr LLC.
 .\ All rights reserved.
@@ -26,7 +26,7 @@
 .\
 .\ $FreeBSD: /repoman/r/ncvs/src/lib/libc/sys/aio_cancel.2,v 1.22 2003/01/13 10:37:11 tjr Exp $
 .\
-.Dd May 4, 2007
+.Dd May 17, 2010
 .Dt AIO_CANCEL 3
 .Os
 .Sh NAME
@@ -64,7 +64,7 @@
 The
 .Fn aio_cancel
 system call returns \-1 to indicate an error, or one of the following:
-.Bl -tag -width Dv
+.Bl -tag -width Er
 .It Bq Dv AIO_CANCELED
 All outstanding requests meeting the criteria specified were cancelled.
 .It Bq Dv AIO_NOTCANCELED
@@ -85,11 +85,7 @@
 argument is an invalid file descriptor.
 .El
 .Sh SEE ALSO
-.Xr aio_error 3 ,
-.Xr aio_read 3 ,
-.Xr aio_return 3 ,
-.Xr aio_suspend 3 ,
-.Xr aio_write 3
+.Xr aio 3
 .Sh STANDARDS
 The
 .Fn aio_cancel
Index: src/lib/librt/aio_error.3
diff -u src/lib/librt/aio_error.3:1.3 src/lib/librt/aio_error.3:1.4
--- src/lib/librt/aio_error.3:1.3	Tue Aug  7 20:45:03 2007
+++ src/lib/librt/aio_error.3	Mon May 17 19:22:31 2010
@@ -1,4 +1,4 @@
-.\ $NetBSD: aio_error.3,v 1.3 2007/08/07 20:45:03 wiz Exp $
+.\ $NetBSD: aio_error.3,v 1.4 2010/05/17 19:22:31 jruoho Exp $
 .\
 .\ Copyright (c) 1999 Softweyr LLC.
 .\ All rights reserved.
@@ -26,7 +26,7 @@
 .\
 .\ $FreeBSD: /repoman/r/ncvs/src/lib/libc/sys/aio_error.2,v 1.20 2006/09/26 09:47:46 vd Exp $
 .\
-.Dd May 4, 2007
+.Dd May 17, 2010
 .Dt AIO_ERROR 3
 .Os
 .Sh NAME
@@ -77,11 +77,7 @@
 .Xr fsync 2 ,
 .Xr read 2 ,
 .Xr write 2 ,
-.Xr aio_cancel 3 ,
-.Xr aio_read 3 ,
-.Xr aio_return 3 ,
-.Xr aio_suspend 3 ,
-.Xr aio_write 3
+.Xr aio 3
 .Sh STANDARDS
 The
 .Fn aio_error
Index: src/lib/librt/aio_read.3
diff -u src/lib/librt/aio_read.3:1.3 src/lib/librt/aio_read.3:1.4
--- src/lib/librt/aio_read.3:1.3	Tue Aug  7 20:45:04 2007
+++ src/lib/librt/aio_read.3	Mon May 17 19:22:31 2010
@@ -1,4 +1,4 @@
-.\ $NetBSD: aio_read.3,v 1.3 2007/08/07 20:45:04 wiz Exp $
+.\ $NetBSD: aio_read.3,v 1.4 2010/05/17 19:22:31 jruoho Exp $
 .\
 .\ Copyright (c) 1998 Terry Lambert
 .\ All rights reserved.
@@ -26,7 +26,7 @@
 .\
 .\ $FreeBSD: /repoman/r/ncvs/src/lib/libc/sys/aio_read.2,v 1.23 2005/12/13 13:43:35 davidxu Exp $
 .\
-.Dd May 4, 2007
+.Dd May 17, 2010
 .Dt AIO_READ 3
 .Os
 .Sh NAME
@@ -187,11 +187,7 @@
 .El
 .Sh SEE ALSO
 .Xr siginfo 2 ,
-.Xr aio_cancel 3 ,
-.Xr aio_error 3 ,
-.Xr aio_return 3 ,
-.Xr aio_suspend 3 ,
-.Xr aio_write 3
+.Xr aio 3
 .Sh STANDARDS
 The
 .Fn aio_read
Index: src/lib/librt/aio_return.3
diff -u src/lib/librt/aio_return.3:1.3 src/lib/librt/aio_return.3:1.4
--- src/lib/librt/aio_return.3:1.3	Tue Aug  7 20:45:04 2007
+++ src/lib/librt/aio_return.3	Mon May 17 19:22:31 2010
@@ -1,4 +1,4 @@
-.\ $NetBSD: aio_return.3,v 1.3 2007/08/07 20:45:04 wiz Exp $
+.\ $NetBSD: aio_return.3,v 1.4 2010/05/17 19:22:31 jruoho Exp $
 .\
 .\ Copyright (c) 1999 Softweyr LLC.
 .\ All rights reserved.
@@ -26,7 +26,7 @@
 .\
 .\ $FreeBSD: /repoman/r/ncvs/src/lib/libc/sys/aio_return.2,v 1.19 2006/10/07 10:49:20 trhodes Exp $
 .\
-.Dd May 4, 2007
+.Dd May 17, 2010
 .Dt AIO_RETURN 3
 .Os
 

CVS commit: src/lib/librt

2010-05-17 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Mon May 17 17:55:49 UTC 2010

Modified Files:
src/lib/librt: aio.3

Log Message:
Writing, rereading, writing, reareading, and yet still one typo.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/lib/librt/aio.3

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/lib/librt

2010-05-17 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Mon May 17 19:04:55 UTC 2010

Modified Files:
src/lib/librt: aio.3

Log Message:
Fix a typo of a typo, and use .Sq in couple of places.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/lib/librt/aio.3

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/lib/librt

2010-05-17 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Mon May 17 19:22:31 UTC 2010

Modified Files:
src/lib/librt: aio.3 aio_cancel.3 aio_error.3 aio_fsync.3 aio_read.3
aio_return.3 aio_suspend.3 aio_write.3 lio_listio.3

Log Message:
Reference only aio(3) in SEE ALSO as it is the central placeholder. Note
timespec(3). Markup: -width Er (not -width Dv), .Dv NULL (not null), etc.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/lib/librt/aio.3 src/lib/librt/aio_cancel.3 \
src/lib/librt/aio_error.3 src/lib/librt/aio_read.3 \
src/lib/librt/aio_return.3 src/lib/librt/aio_suspend.3 \
src/lib/librt/aio_write.3
cvs rdiff -u -r1.5 -r1.6 src/lib/librt/aio_fsync.3
cvs rdiff -u -r1.2 -r1.3 src/lib/librt/lio_listio.3

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/lib/librt

2010-05-14 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Fri May 14 08:30:34 UTC 2010

Modified Files:
src/lib/librt: mq_open.3

Log Message:
Fix spaco.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/lib/librt/mq_open.3

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/librt/mq_open.3
diff -u src/lib/librt/mq_open.3:1.3 src/lib/librt/mq_open.3:1.4
--- src/lib/librt/mq_open.3:1.3	Fri May 14 03:25:20 2010
+++ src/lib/librt/mq_open.3	Fri May 14 08:30:34 2010
@@ -1,4 +1,4 @@
-.\	$NetBSD: mq_open.3,v 1.3 2010/05/14 03:25:20 joerg Exp $
+.\	$NetBSD: mq_open.3,v 1.4 2010/05/14 08:30:34 wiz Exp $
 .\
 .\ Copyright (c) 2001-2003 The Open Group, All Rights Reserved
 .\
@@ -85,7 +85,7 @@
 .Pp
 Any combination of the remaining flags may be specified in the value of
 .Fa oflag :
-.Bl -tag -width . Dv O_NONBLOCK
+.Bl -tag -width .Dv O_NONBLOCK
 .It Dv O_CREAT
 Create a message queue.
 It requires two additional arguments:



CVS commit: src/lib/librt

2010-05-13 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Fri May 14 03:25:20 UTC 2010

Modified Files:
src/lib/librt: mq_open.3

Log Message:
Provide a sane argument for -width.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/lib/librt/mq_open.3

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/librt/mq_open.3
diff -u src/lib/librt/mq_open.3:1.2 src/lib/librt/mq_open.3:1.3
--- src/lib/librt/mq_open.3:1.2	Thu May  6 10:49:53 2010
+++ src/lib/librt/mq_open.3	Fri May 14 03:25:20 2010
@@ -1,4 +1,4 @@
-.\	$NetBSD: mq_open.3,v 1.2 2010/05/06 10:49:53 jruoho Exp $
+.\	$NetBSD: mq_open.3,v 1.3 2010/05/14 03:25:20 joerg Exp $
 .\
 .\ Copyright (c) 2001-2003 The Open Group, All Rights Reserved
 .\
@@ -59,7 +59,7 @@
 Applications must specify exactly one of the first three values
 (access modes) below in the value of
 .Fa oflag :
-.Bl -tag -width It
+.Bl -tag -width .Dv O_RDONLY
 .It Dv O_RDONLY
 Open the message queue for receiving messages.
 The process can use the returned message queue descriptor with
@@ -85,7 +85,7 @@
 .Pp
 Any combination of the remaining flags may be specified in the value of
 .Fa oflag :
-.Bl -tag -width It
+.Bl -tag -width . Dv O_NONBLOCK
 .It Dv O_CREAT
 Create a message queue.
 It requires two additional arguments:



CVS commit: src/lib/librt

2010-05-13 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Fri May 14 03:25:20 UTC 2010

Modified Files:
src/lib/librt: mq_open.3

Log Message:
Provide a sane argument for -width.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/lib/librt/mq_open.3

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/lib/librt

2010-05-06 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Thu May  6 10:40:43 UTC 2010

Modified Files:
src/lib/librt: pset.3

Log Message:
Markup: .Ss - .Sh, .Fa - .Fn, offset indent, and use lists in two places
for clarity.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/lib/librt/pset.3

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/librt/pset.3
diff -u src/lib/librt/pset.3:1.10 src/lib/librt/pset.3:1.11
--- src/lib/librt/pset.3:1.10	Thu Jan 29 00:54:54 2009
+++ src/lib/librt/pset.3	Thu May  6 10:40:43 2010
@@ -1,4 +1,4 @@
-.\	$NetBSD: pset.3,v 1.10 2009/01/29 00:54:54 rmind Exp $
+.\	$NetBSD: pset.3,v 1.11 2010/05/06 10:40:43 jruoho Exp $
 .\
 .\ Copyright (c) 2008 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -27,7 +27,7 @@
 .\ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\ POSSIBILITY OF SUCH DAMAGE.
 .\
-.Dd January 28, 2009
+.Dd May 6, 2010
 .Dt PSET 3
 .Os
 .Sh NAME
@@ -53,7 +53,7 @@
 After processes or threads are bound to a group of processors by
 the API, the group henceforth runs only those processes or threads.
 This section describes the functions used to control processor sets.
-.Ss FUNCTIONS
+.Sh FUNCTIONS
 .Bl -tag -width compact
 .It Fn pset_create psid
 Creates a processor set, and returns its ID into
@@ -70,6 +70,9 @@
 if the pointer is not
 .Dv NULL .
 .Pp
+The following actions can be specified:
+.Bl -enum -offset 2n
+.It
 If
 .Fa psid
 is set to
@@ -77,7 +80,7 @@
 then the current processor set ID will be returned into
 .Fa psid ,
 and no assignment will be performed.
-.Pp
+.It
 If
 .Fa psid
 is set to
@@ -85,12 +88,13 @@
 then the processor set ID of the calling process will be used, and
 .Fa psid
 will be ignored.
-.Pp
+.It
 If
 .Fa psid
 is set to
 .Dv PS_NONE ,
 any assignment to the processor will be cleared.
+.El
 .It Fn pset_bind psid type id opsid
 Dedicates the processor set specified by
 .Fa psid
@@ -105,13 +109,16 @@
 .Nx
 supports the following types of targets specified by
 .Fa type :
-.Bl -tag -width P_PID
+.Bl -tag -width P_LWPID -offset 2n
 .It Dv P_PID
 Process identified by the PID.
 .It Dv P_LWPID
 Thread of the calling process indentified by the LID.
 .El
 .Pp
+The following actions can be specified:
+.Bl -enum -offset 2n
+.It
 If
 .Fa psid
 is set to
@@ -121,17 +128,19 @@
 will be returned in
 .Fa opsid ,
 and no binding will be performed.
+.It
 If
 .Fa psid
 is set to
 .Dv PS_MYID ,
 then the processor set ID of the calling process will be used.
-.Pp
+.It
 If
 .Fa psid
 is set to
 .Dv PS_NONE ,
 the specified target will be unbound from the processor set.
+.El
 .It Fn pset_destroy psid
 Destroys the processor set specified by
 .Fa psid .
@@ -146,7 +155,7 @@
 .El
 .Sh NOTES
 The
-.Fa pset_bind
+.Fn pset_bind
 function can return the current processor set ID to which the
 target is bound, or
 .Dv PS_NONE .



CVS commit: src/lib/librt

2010-05-06 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Thu May  6 10:49:53 UTC 2010

Modified Files:
src/lib/librt: mq_open.3 pset.3 sched.3

Log Message:
Use standard section headers, as documented in mdoc.samples(7).


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/lib/librt/mq_open.3
cvs rdiff -u -r1.11 -r1.12 src/lib/librt/pset.3
cvs rdiff -u -r1.8 -r1.9 src/lib/librt/sched.3

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/librt/mq_open.3
diff -u src/lib/librt/mq_open.3:1.1 src/lib/librt/mq_open.3:1.2
--- src/lib/librt/mq_open.3:1.1	Mon Jan  5 21:19:49 2009
+++ src/lib/librt/mq_open.3	Thu May  6 10:49:53 2010
@@ -1,8 +1,8 @@
-.\	$NetBSD: mq_open.3,v 1.1 2009/01/05 21:19:49 rmind Exp $
+.\	$NetBSD: mq_open.3,v 1.2 2010/05/06 10:49:53 jruoho Exp $
 .\
 .\ Copyright (c) 2001-2003 The Open Group, All Rights Reserved
 .\
-.Dd January 5, 2009
+.Dd May 6, 2010
 .Dt MQ_OPEN 3
 .Os
 .Sh NAME
@@ -178,7 +178,7 @@
 The
 .Fn mq_open
 function does not add or remove messages from the queue.
-.Sh NOTES
+.Sh IMPLEMENTATION NOTES
 The
 .Xr select 2
 and

Index: src/lib/librt/pset.3
diff -u src/lib/librt/pset.3:1.11 src/lib/librt/pset.3:1.12
--- src/lib/librt/pset.3:1.11	Thu May  6 10:40:43 2010
+++ src/lib/librt/pset.3	Thu May  6 10:49:53 2010
@@ -1,4 +1,4 @@
-.\	$NetBSD: pset.3,v 1.11 2010/05/06 10:40:43 jruoho Exp $
+.\	$NetBSD: pset.3,v 1.12 2010/05/06 10:49:53 jruoho Exp $
 .\
 .\ Copyright (c) 2008 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -153,7 +153,7 @@
 .Dv PS_MYID ,
 the processor set ID of the caller thread will be used.
 .El
-.Sh NOTES
+.Sh IMPLEMENTATION NOTES
 The
 .Fn pset_bind
 function can return the current processor set ID to which the

Index: src/lib/librt/sched.3
diff -u src/lib/librt/sched.3:1.8 src/lib/librt/sched.3:1.9
--- src/lib/librt/sched.3:1.8	Sat Nov  1 14:04:52 2008
+++ src/lib/librt/sched.3	Thu May  6 10:49:53 2010
@@ -1,4 +1,4 @@
-.\	$NetBSD: sched.3,v 1.8 2008/11/01 14:04:52 wiz Exp $
+.\	$NetBSD: sched.3,v 1.9 2010/05/06 10:49:53 jruoho Exp $
 .\
 .\ Copyright (c) 2008 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -27,7 +27,7 @@
 .\ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\ POSSIBILITY OF SUCH DAMAGE.
 .\
-.Dd October 31, 2008
+.Dd May 6, 2010
 .Dt SCHED 3
 .Os
 .Sh NAME
@@ -242,7 +242,7 @@
 .Fa pid
 is not zero.
 .El
-.Sh NOTES
+.Sh IMPLEMENTATION NOTES
 Portable applications should not use the
 .Fn sched_setaffinity_np
 and



CVS commit: src/lib/librt

2010-05-06 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Thu May  6 10:40:43 UTC 2010

Modified Files:
src/lib/librt: pset.3

Log Message:
Markup: .Ss - .Sh, .Fa - .Fn, offset indent, and use lists in two places
for clarity.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/lib/librt/pset.3

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/lib/librt

2010-05-06 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Thu May  6 10:49:53 UTC 2010

Modified Files:
src/lib/librt: mq_open.3 pset.3 sched.3

Log Message:
Use standard section headers, as documented in mdoc.samples(7).


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/lib/librt/mq_open.3
cvs rdiff -u -r1.11 -r1.12 src/lib/librt/pset.3
cvs rdiff -u -r1.8 -r1.9 src/lib/librt/sched.3

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.