Back to index

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

Go to the source code of this file.

Functions

int pthread_rwlockattr_setpshared (pthread_rwlockattr_t *attr, int pshared)

Function Documentation

int pthread_rwlockattr_setpshared ( pthread_rwlockattr_t *  attr,
int  pshared 
)

Definition at line 25 of file pthread_rwlockattr_setpshared.c.

{
  struct pthread_rwlockattr *iattr;

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

  iattr = (struct pthread_rwlockattr *) attr;

  iattr->pshared = pshared;

  return 0;
}