pthread_attr_setstackaddr - Online Linux Manual PageSection : 3
Updated : 2022-12-15
Source : Linux man-pages 6.03
NAMEpthread_attr_setstackaddr, pthread_attr_getstackaddr − set/get stack address attribute in thread attributes object
LIBRARYPOSIX threads library (libpthread, −lpthread)
SYNOPSIS#include <pthread.h>int pthread_attr_setstackaddr(pthread_attr_t *attr, void *stackaddr);
int pthread_attr_getstackaddr(const pthread_attr_t *restrict attr,
void **restrict stackaddr);
DESCRIPTIONThese functions are obsolete: do not use them. Use pthread_attr_setstack(3) and pthread_attr_getstack(3) instead. The pthread_attr_setstackaddr() function sets the stack address attribute of the thread attributes object referred to by attr to the value specified in stackaddr. This attribute specifies the location of the stack that should be used by a thread that is created using the thread attributes object attr. stackaddr should point to a buffer of at least PTHREAD_STACK_MIN bytes that was allocated by the caller. The pages of the allocated buffer should be both readable and writable. The pthread_attr_getstackaddr() function returns the stack address attribute of the thread attributes object referred to by attr in the buffer pointed to by stackaddr.
RETURN VALUEOn success, these functions return 0; on error, they return a nonzero error number.
ERRORSNo errors are defined (but applications should nevertheless handle a possible error return).
VERSIONSThese functions are provided since glibc 2.1.
ATTRIBUTESFor an explanation of the terms used in this section, see attributes(7). InterfaceAttributeValue pthread_attr_setstackaddr(), pthread_attr_getstackaddr() Thread safetyMT-Safe
STANDARDSPOSIX.1-2001 specifies these functions but marks them as obsolete. POSIX.1-2008 removes the specification of these functions.
NOTESDo not use these functions! They cannot be portably used, since they provide no way of specifying the direction of growth or the range of the stack. For example, on architectures with a stack that grows downward, stackaddr specifies the next address past the highest address of the allocated stack area. However, on architectures with a stack that grows upward, stackaddr specifies the lowest address in the allocated stack area. By contrast, the stackaddr used by pthread_attr_setstack(3) and pthread_attr_getstack(3), is always a pointer to the lowest address in the allocated stack area (and the stacksize argument specifies the range of the stack).
SEE ALSOpthread_attr_init(3), pthread_attr_setstack(3), pthread_attr_setstacksize(3), pthread_create(3), pthreads(7) 0
Johanes Gumabo
Data Size : 9,409 byte
man-pthread_attr_getstackaddr.3Build : 2024-12-05, 20:55 :
Visitor Screen : x
Visitor Counter ( page / site ) : 5 / 184,634
Visitor ID : :
Visitor IP : 3.143.237.54 :
Visitor Provider : AMAZON-02 :
Provider Position ( lat x lon ) : 39.962500 x -83.006100 : x
Provider Accuracy Radius ( km ) : 1000 :
Provider City : Columbus :
Provider Province : Ohio , : ,
Provider Country : United States :
Provider Continent : North America :
Visitor Recorder : Version :
Visitor Recorder : Library :
Online Linux Manual Page : Version : Online Linux Manual Page - Fedora.40 - march=x86-64 - mtune=generic - 24.12.05
Online Linux Manual Page : Library : lib_c - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Online Linux Manual Page : Library : lib_m - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Data Base : Version : Online Linux Manual Page Database - 24.04.13 - march=x86-64 - mtune=generic - fedora-38
Data Base : Library : lib_c - 23.02.07 - march=x86-64 - mtune=generic - fedora.36
Very long time ago, I have the best tutor, Wenzel Svojanovsky . If someone knows the email address of Wenzel Svojanovsky , please send an email to johanes_gumabo@yahoo.co.id .
If error, please print screen and send to johanes_gumabo@yahoo.co.id
Under development. Support me via PayPal.