PTHREAD_RWLOCKATTR_GETPSHARED(3)
β¨ NAME β¨
okay bestie, welcome to the pthread_rwlockattr_getpshared(3) page from the Library Functions Manual π this one is literally about getting the process shared attribute, and it's lowkey iconic.
pthread_rwlockattr_getpshared β get the process shared attribute. π«Ά
π LIBRARY π
POSIX Threads Library (libpthread, -lpthread) β that's where this lives, bestie. β¨
π§ SYNOPSIS π§
#include <pthread.h>
int
pthread_rwlockattr_getpshared(const pthread_rwlockattr_t *restrict attr,
int *restrict pshared);
No cap, that's the exact include and signature β copy it character for character. π
πΈ DESCRIPTION πΈ
So the pthread_rwlockattr_getpshared() function is used to get the process shared setting of a read/write lock attribute object. The setting is returned via pshared, and it may be one of two values:
PTHREAD_PROCESS_SHAREDβ Any thread of any process that has access to the memory where the read/write lock resides can manipulate the lock. π₯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. π
π RETURN VALUES π
If successful, the pthread_rwlockattr_getpshared() function will return zero. Otherwise an error number will be returned to indicate the error. periodt. π
π ERRORS π
The pthread_rwlockattr_getpshared() function may fail if:
[EINVAL]β The value specified byattris invalid. π©
π¦ SEE ALSO π¦
go check these besties, iykyk π«Άβ¨
β STANDARDS β
The pthread_rwlockattr_getpshared() function is expected to conform to Version 2 of the Single UNIX Specification (βSUSv2β). π
π HISTORY π
The pthread_rwlockattr_getpshared() function first appeared in FreeBSD 3.0. vintage but still iconic, fr fr. π
source/version: Debian Β· date: August 17, 2018 Β· stamp: PTHREAD_RWLOCKATTR_GETPSHARED(3) β mwah πβ¨
π¦ 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