Back to index

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

Go to the source code of this file.

Functions

int __pthread_attr_getinheritsched (pthread_attr_t *attr, int *inherit) const

Function Documentation

int __pthread_attr_getinheritsched ( pthread_attr_t attr,
int inherit 
) const

Definition at line 25 of file pthread_attr_getinheritsched.c.

{
  struct pthread_attr *iattr;

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

  /* Store the current values.  */
  *inherit = (iattr->flags & ATTR_FLAG_NOTINHERITSCHED
             ? PTHREAD_EXPLICIT_SCHED : PTHREAD_INHERIT_SCHED);

  return 0;
}