Back to index

glibc  2.9
pthread_attr_getstack.c File Reference
#include <assert.h>
#include "pthreadP.h"

Go to the source code of this file.


int __pthread_attr_getstack (pthread_attr_t *attr, void **stackaddr, size_t *stacksize) const

Function Documentation

int __pthread_attr_getstack ( pthread_attr_t attr,
void **  stackaddr,
size_t stacksize 
) const

Definition at line 25 of file pthread_attr_getstack.c.

  struct pthread_attr *iattr;

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

  /* Store the result.  */
  *stackaddr = (char *) iattr->stackaddr - iattr->stacksize;
  *stacksize = iattr->stacksize;

  return 0;