Glibc switched to using a POSIX-specified error code for
this error case.
http://bugs.linuxbase.org/show_bug.cgi?id=2375
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Acked-by: Stew Benedict <stewb@linux-foundation.org>
Passing pointer arguments to makecontext() is possible,
but only on some architectures, and with no guarantees
of portability.
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=504699
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Reported-by: Paul Evans <leonerd@leonerd.org.uk>
The page was a bit fuzzy in describing the return values for
various cases. In particular, it needed to be more explicit
in describing what happens for the "not found" case.
This is an analogous change to the previous change for
getpwnam.3, made after Andreas Henriksson's report.
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=504787
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
The page was a bit fuzzy in describing the return values for
various cases. In particular, it needed to be more explicit
in describing what happens for the "not found" case.
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=504787
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Reported-by: Andreas Henriksson <andreas@fatal.se>
The page was a bit fuzzy in describing the return values for
various cases. In particular, it needed to be more explicit
in describing what happens for the "not found" case.
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=504708
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Reported-by: Andreas Henriksson <andreas@fatal.se>
According to POSIX.1-2001, the CLOCK_PROCESS_CPUTIME_ID and
CLOCK_THREAD_CPUTIME_ID clocks should be settable, but
currently they are not.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
s/2.6.20/2.6.30/ to fix an earlier typo in the description
of the likely kernel version that will have fully fledged
real-time features.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Rework the text that refers to sched_setscheduler(2) for
a description of the permissions required to change
the scheduling policy and priority.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
In particular, note that in each pthreads function that takes
a thread ID argument, that ID by definition refers to a thread
in the same process as the caller.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
On MacOS X at least, pthread_attr_setstacksize(3) can fail
with EINVAL if 'stacksize' is not a multiple of the system
page size. Best to mention this so as to aid people writing
portable programs.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Reported-by: Karsten Weiss <knweiss@gmail.com>
==
From: Karsten Weiss <knweiss@gmail.com>
Date: Fri, Oct 31, 2008 at 3:46 PM
Subject: pthread_create(3) - example bug + problems
[...]
A look in the pthread_set_stacksize man page on Mac revealed that on
Mac the stack size must not only be at least PTHREAD_STACK_MIN...
[...]
...but the new stack size must also be a multiple of the system page
size!
From pthread_attr_setstacksize(3):
pthread_attr_setstacksize() will fail if:
[EINVAL] Invalid value for attr.
[EINVAL] stacksize is less than PTHREAD_STACK_MIN.
!!! [EINVAL] stacksize is not a multiple of the system page size.
See for yourself (PTHREAD_STACK_MIN==8192 on Mac OS X):
$ ./pthread_test -s $((8192*10-1)) a
pthread_attr_setstacksize: Invalid argument
$ ./pthread_test -s $((8192*10)) a
Thread 1: top of stack near 0xb0014f6c; argv_string=a
Joined with thread 1; returned value was A
$ ./pthread_test -s $((8192*10+1)) a
pthread_attr_setstacksize: Invalid argument