Index: head/lib/libc/sys/cpuset_getaffinity.2 =================================================================== --- head/lib/libc/sys/cpuset_getaffinity.2 +++ head/lib/libc/sys/cpuset_getaffinity.2 @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 20, 2015 +.Dd June 2, 2016 .Dt CPUSET_GETAFFINITY 2 .Os .Sh NAME @@ -114,6 +114,8 @@ The following error codes may be set in .Va errno : .Bl -tag -width Er +.\" When changing this list, consider updating share/man/man3/pthread_create.3, +.\" since that function can return any of these errors. .It Bq Er EINVAL The .Fa level Index: head/lib/libc/sys/thr_new.2 =================================================================== --- head/lib/libc/sys/thr_new.2 +++ head/lib/libc/sys/thr_new.2 @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 1, 2016 +.Dd June 2, 2016 .Dt THR_NEW 2 .Os .Sh NAME @@ -175,6 +175,8 @@ .Fn thr_new operation returns the following errors: .Bl -tag -width Er +.\" When changing this list, consider updating share/man/man3/pthread_create.3, +.\" since that function can return any of these errors. .It Bq Er EFAULT The memory pointed to by the .Fa param @@ -188,7 +190,7 @@ .Fa rtp arguments is not valid. .It Bq Er EFAULT -Specified stack base is invalid, or the kernel was unable to put required +The specified stack base is invalid, or the kernel was unable to put required initial data on the stack. .It Bq Er EINVAL The @@ -205,6 +207,9 @@ and specifies invalid scheduling parameters. .It Bq Er EINVAL The specified TLS base is invalid. +.It Bq Er EPERM +The caller does not have permission to set the scheduling parameters or +scheduling policy. .It Bq Er EPROCLIM Creation of the new thread would exceed the .Dv RACCT_NTHR @@ -216,7 +221,7 @@ .Xr sysctl 2 limit. .It Bq Er ENOMEM -No kernel memory to allocate for the new thread structures. +There was not enough kernel memory to allocate the new thread structures. .El .Sh SEE ALSO .Xr ps 1 , Index: head/share/man/man3/pthread_attr_affinity_np.3 =================================================================== --- head/share/man/man3/pthread_attr_affinity_np.3 +++ head/share/man/man3/pthread_attr_affinity_np.3 @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 8, 2010 +.Dd June 2, 2016 .Dt PTHREAD_ATTR_AFFINITY_NP 3 .Os .Sh NAME @@ -132,8 +132,8 @@ .Xr cpuset 2 , .Xr cpuset_getid 2 , .Xr cpuset_setid 2 , -.Xr pthread_get_affinity_np 3 , -.Xr pthread_set_affinity_np 3 +.Xr pthread_getaffinity_np 3 , +.Xr pthread_setaffinity_np 3 .Sh STANDARDS The .Nm pthread_attr_getaffinity_np Index: head/share/man/man3/pthread_create.3 =================================================================== --- head/share/man/man3/pthread_create.3 +++ head/share/man/man3/pthread_create.3 @@ -30,7 +30,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 15, 2014 +.Dd June 2, 2016 .Dt PTHREAD_CREATE 3 .Os .Sh NAME @@ -101,22 +101,41 @@ .Sh ERRORS The .Fn pthread_create -function will fail if: +function can return any of the following errors: .Bl -tag -width Er +.It Bq Er ENOMEM +The system lacked the necessary resources to create another thread. .It Bq Er EAGAIN -The system lacked the necessary resources to create another thread, or -the system-imposed limit on the total number of threads in a process -[PTHREAD_THREADS_MAX] would be exceeded. +The system-imposed limit on the total number of threads in a process +.Dv [PTHREAD_THREADS_MAX] +would be exceeded. +.It Bq Er EAGAIN +The +.Dv RACCT_NTHR +limit would be exceeded; see +.Xr racct 2 . .It Bq Er EPERM -The caller does not have appropriate permission to set the required scheduling -parameters or scheduling policy. +The caller does not have permission to set the scheduling parameters or +scheduling policy. .It Bq Er EINVAL -The value specified by +A value specified by .Fa attr is invalid. +.It Bq Er EDEADLK +The CPU set specified by +.Fa attr +would prevent the thread from running on any CPU. +.It Bq Er EFAULT +The stack base specified by +.Fa attr +is invalid, or the kernel was unable to put required +initial data on the stack. .El .Sh SEE ALSO +.Xr cpuset_setaffinity 2 , .Xr fork 2 , +.Xr racct 2 , +.Xr thr_new 2 , .Xr pthread_attr 3 , .Xr pthread_cancel 3 , .Xr pthread_cleanup_pop 3 ,