Back to index

glibc  2.9
Defines | Functions
pthread_attr_setstack.c File Reference
#include <assert.h>
#include <errno.h>
#include <limits.h>
#include "pthreadP.h"
#include <shlib-compat.h>
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define NEW_VERNUM   GLIBC_2_3_3

Functions

int __pthread_attr_setstack (pthread_attr_t *attr, void *stackaddr, size_t stacksize)
 versioned_symbol (libpthread, __pthread_attr_setstack, pthread_attr_setstack, NEW_VERNUM)

Define Documentation

#define NEW_VERNUM   GLIBC_2_3_3

Definition at line 27 of file pthread_attr_setstack.c.


Function Documentation

int __pthread_attr_setstack ( pthread_attr_t attr,
void *  stackaddr,
size_t  stacksize 
)

Definition at line 32 of file pthread_attr_setstack.c.

{
  struct pthread_attr *iattr;

  assert (sizeof (*attr) >= sizeof (struct pthread_attr));
  iattr = (struct pthread_attr *) attr;

  /* Catch invalid sizes.  */
  if (stacksize < PTHREAD_STACK_MIN)
    return EINVAL;

#ifdef EXTRA_PARAM_CHECKS
  EXTRA_PARAM_CHECKS;
#endif

  iattr->stacksize = stacksize;
  iattr->stackaddr = (char *) stackaddr + stacksize;
  iattr->flags |= ATTR_FLAG_STACKADDR;

  return 0;
}
versioned_symbol ( libpthread  ,
__pthread_attr_setstack  ,
pthread_attr_setstack  ,
NEW_VERNUM   
)