Back to index

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

Go to the source code of this file.


int __pthread_attr_getstackaddr (pthread_attr_t *attr, void **stackaddr) const

Function Documentation

int __pthread_attr_getstackaddr ( pthread_attr_t attr,
void **  stackaddr 
) const

Definition at line 26 of file pthread_attr_getstackaddr.c.

  struct pthread_attr *iattr;

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

  /* Some code assumes this function to work even if no stack address
     has been set.  Let them figure it out for themselves what the
     value means.  Simply store the result.  */
  *stackaddr = iattr->stackaddr;

  return 0;