Index: lib/libc/sys/thr_new.2 =================================================================== --- lib/libc/sys/thr_new.2 +++ lib/libc/sys/thr_new.2 @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 5, 2016 +.Dd May 31, 2016 .Dt THR_NEW 2 .Os .Sh NAME @@ -198,6 +198,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 Index: share/man/man3/pthread_create.3 =================================================================== --- share/man/man3/pthread_create.3 +++ share/man/man3/pthread_create.3 @@ -30,7 +30,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 15, 2014 +.Dd May 31, 2016 .Dt PTHREAD_CREATE 3 .Os .Sh NAME @@ -101,22 +101,29 @@ .Sh ERRORS The .Fn pthread_create -function will fail if: +function can return any of the following errors, +in addition to those described in +.Xr cpuset_setaffinity 2 +and +.Xr thr_new 2 , +except for +.Er EPROCLIM , +which is returned as +.Er EAGAIN . .Bl -tag -width Er .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. -.It Bq Er EPERM -The caller does not have appropriate permission to set the required scheduling -parameters or scheduling policy. .It Bq Er EINVAL The value specified by .Fa attr is invalid. .El .Sh SEE ALSO +.Xr cpuset_setaffinity 2 , .Xr fork 2 , +.Xr thr_new 2 , .Xr pthread_attr 3 , .Xr pthread_cancel 3 , .Xr pthread_cleanup_pop 3 ,