PTHREAD_RWLOCKATTR_SETPSHARED(3)
β¨ NAME β¨
okay bestie, welcome to the PTHREAD_RWLOCKATTR_SETPSHARED(3) page from the Library Functions Manual β this one is literally all about setting the process shared attribute. That's the name, and it ate. π
π LIBRARY π
POSIX Threads Library (libpthread, -lpthread) β yes, link it and slay. π§΅β¨
π οΈ SYNOPSIS π οΈ
#include <pthread.h>
int
pthread_rwlockattr_setpshared(pthread_rwlockattr_t *attr, int pshared);
π DESCRIPTION π
So pthread_rwlockattr_setpshared() sets the process shared attribute of attr to the value that pshared references. The pshared argument may be one of two values, and choosing one is giving main character energy:
PTHREAD_PROCESS_SHAREDβ Any thread of any process that has access to the memory where the read/write lock resides can manipulate the lock. Shared is shared, bestie.PTHREAD_PROCESS_PRIVATEβ Only threads created within the same process as the thread that initialized the read/write lock can manipulate the lock. This is the default value, ngl.
π«Ά RETURN VALUES π«Ά
If successful, the pthread_rwlockattr_setpshared() function will return zero. Otherwise an error number will be returned to indicate the error. No cap. β¨
π ERRORS π
The pthread_rwlockattr_setpshared() function will fail if:
[EINVAL]β the value specified byattrorpsharedis invalid.
π SEE ALSO π
π STANDARDS π
The pthread_rwlockattr_setpshared() function is expected to conform to Version 2 of the Single UNIX Specification (βSUSv2β). Iconic behavior, fr fr. π
π¦ HISTORY π¦
The pthread_rwlockattr_setpshared() function first appeared in FreeBSD 3.0. Support for process-shared read/write locks appeared in FreeBSD 11.0. Look at her grow. ππ
mwah π β this page is from Debian, dated May 31, 2016, and it's the PTHREAD_RWLOCKATTR_SETPSHARED(3) page. periodt. π
π¦ where this page comes from
- freebsd 14.5: base 14.5
- freebsd 15.1: base 15.1
- nixpkgs unstable: source
- Copyright (c) 1998 Alex Nash
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms