Back to index

glibc  2.9
Functions
pthread_barrierattr_setpshared.c File Reference
#include <errno.h>
#include "pthreadP.h"

Go to the source code of this file.

Functions

int pthread_barrierattr_setpshared (pthread_barrierattr_t *attr, int pshared)

Function Documentation

int pthread_barrierattr_setpshared ( pthread_barrierattr_t *  attr,
int  pshared 
)

Definition at line 25 of file pthread_barrierattr_setpshared.c.

{
  struct pthread_barrierattr *iattr;

  if (pshared != PTHREAD_PROCESS_PRIVATE
      && __builtin_expect (pshared != PTHREAD_PROCESS_SHARED, 0))
    return EINVAL;

  iattr = (struct pthread_barrierattr *) attr;

  iattr->pshared = pshared;

  return 0;
}