]> git.saurik.com Git - apple/libpthread.git/blame - man/pthread_attr_set_getstackaddr.3
libpthread-105.10.1.tar.gz
[apple/libpthread.git] / man / pthread_attr_set_getstackaddr.3
CommitLineData
f1a1da6c
A
1.\" Copyright (c) 2004-2007 Apple Inc. All rights reserved.
2.Dd December 31, 2007
3.Dt PTHREAD_ATTR 3
4.Os
5.Sh NAME
6.Nm pthread_attr_getstackaddr ,
7.Nm pthread_attr_setstackaddr
8.Nd thread attribute operations
9.Sh SYNOPSIS
10.Fd #include <pthread.h>
11.Ft int
12.Fo pthread_attr_getstackaddr
13.Fa "const pthread_attr_t *restrict attr"
14.Fa "void **restrict stackaddr"
15.Fc
16.Ft int
17.Fo pthread_attr_setstackaddr
18.Fa "pthread_attr_t *attr"
19.Fa "void *stackaddr"
20.Fc
21.Sh DESCRIPTION
22Thread attributes are used to specify parameters to
23.Fn pthread_create .
24One attribute object can be used in multiple calls to
25.Fn pthread_create ,
26with or without modifications between calls.
27.Pp
28The functions
29.Fn pthread_attr_setstackaddr
30and
31.Fn pthread_attr_getstackaddr
32respectively, set and get the address at which the stack of the newly created thread should be located.
33The stackaddr attribute is set within the
34.Fa attr
35argument, which can subsequently be used as an argument to
36.Fn pthread_create .
37.Sh RETURN VALUES
38If successful, these functions return 0.
39Otherwise, an error number is returned to indicate the error.
40.Fn pthread_attr_getstackaddr
41returns the stackaddr attribute value in
42.Fa stackaddr
43if successful.
44.Sh ERRORS
45.Fn pthread_attr_setstackaddr
46will fail if:
47.Bl -tag -width Er
48.\" ========
49.It Bq Er EINVAL
50Invalid value for
51.Fa attr .
52.\" ========
53.El
54.Pp
55.Fn pthread_attr_getstackaddr
56will fail if:
57.Bl -tag -width Er
58.\" ========
59.It Bq Er EINVAL
60Invalid value for
61.Fa attr .
62.\" ========
63.El
64.Pp
65.Sh SEE ALSO
66.Xr pthread_create 3 ,
67.Xr pthread_attr_init 3 ,
68.Xr pthread_attr_setdetachstate 3 ,
69.Xr pthread_attr_setstacksize 3
70.Sh STANDARDS
71.Fn pthread_attr_setstackaddr ,
72.Fn pthread_attr_getstackaddr ,
73conform to
74.St -p1003.1-96