Index of Section 2 Manual Pages

Interix / SUApthread_attr_getstack.2Interix / SUA

pthread_attr_getstack(2)                       pthread_attr_getstack(2)

  pthread_attr_getstack()

  NAME

    pthread_attr_getstack(), pthread_attr_getstack() - get or set the thread
    stack attribute

  SYNOPSIS

    #include 

    int pthread_attr_getstack(const pthread_attr_t *attr, void **stackaddr,
    size_t *stacksize);
    int pthread_attr_setstack(pthread_attr_t *attr, void *stackaddr, size_t
    stacksize);

  DESCRIPTION

    The pthread_attr_setstack(2) function sets the stack-address and stack-
    size attributes of the thread attributes object referenced by attr using
    the values of the stackaddr and stacksize arguments.

    The stackaddr argument specifies the lowest addressable byte of the stack
    area of the thread to be created using the attr structure, and the
    stacksize argument specifies the size of the stack area in bytes.

    After the attributes have been set in the thread attributes object
    referenced by attr, the pthread_create(2) function can be called to create
    a new thread with the specified attributes. This function does not affect
    the current running thread.

    The pthread_attr_getstack(2) function retrieves the stack-address and
    stack-size attributes of the thread attributes object referenced by attr,
    storing the values in the locations referenced by the stackaddr and
    stacksize arguments, respectively.

  RETURN VALUES

    On success, both functions return 0; otherwise, they return an error
    number.

  ERRORS

    The pthread_attr_setstack() function can fail for the following reasons:

    [EINVAL]
        The size of the specified stack is out of bounds, or the value of
        stackaddr or stackaddr+stacksize is not properly aligned for use as a
        stack.

    [EACCES]
        The thread does not have write access to the stack pages defined by
        stackaddr and stacksize.

    Neither function returns [EINTR].

  SEE ALSO

    pthread_attr_init(2)

    pthread_attr_getstackaddr(2)

    pthread_attr_getstacksize(2)

    pthread_create(2)

  USAGE NOTES

    All of these functions are thread safe.

    None of these functions are async-signal safe.


Interix / SUAHosted at SUA Community for Interix, SUA and SFUInterix / SUA