PTHREAD...PSHARED(3POSIX)

🌸 PTHREAD...PSHARED β€” the POSIX girlies' manual, 3POSIX edition 🌸

okay bestie, pull up a chair, we're reading a POSIX Programmer's Manual page together and honestly? it's giving ✨essential lore✨. this one lives in section 3POSIX.


πŸ’– PROLOG πŸ’–

okay so first things first, and this is important, no cap: this manual page is part of the POSIX Programmer's Manual. periodt.

but here's the tea πŸ«– β€” the Linux implementation of this interface may differ. like, it might not match up. so if you're on Linux, go consult the corresponding Linux manual page for the deets on Linux behavior. OR β€” and this is the real plot twist 😭 β€” the interface may not be implemented on Linux at all. yeah. vibe check failed. check your system, bestie.


✨ NAME ✨

pthread_mutexattr_setpshared β€” set the process-shared attribute πŸ‘‘

like, that's the whole name. it sets the process-shared attribute. short king behavior fr fr.


πŸŽ€ SYNOPSIS πŸŽ€

here's how you summon it, copy it exactly, don't freestyle:

#include <pthread.h>

int pthread_mutexattr_setpshared(pthread_mutexattr_t *attr,
    int pshared);

that's attr β€” a pointer to a pthread_mutexattr_t β€” and pshared, an int. two arguments, zero drama. πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

okay so this is the part where I'm supposed to explain everything and instead the manpage just says… go read the other one 😭

Refer to pthread_mutexattr_getpshared().

that's it. that's the description. it's giving "ask your sister, she knows" energy. so like, genuinely, go read pthread_mutexattr_getpshared() for the actual details. iykyk.


okay now the serious part, bestie, and I need you to actually read this one because it's not vibes, it's law 🫢:

Portions of this text are reprinted and reproduced in electronic form from IEEE Std 1003.1-2017, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 7, 2018 Edition, Copyright (C) 2018 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group.

In the event of any discrepancy between this version and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. 🏁 like, that's the final boss. if something doesn't match, the original wins, no debate.

The original Standard can be obtained online at:

http://www.opengroup.org/unix/online.html

and lastly, the disclaimer we all need: any typographical or formatting errors that appear in this page are most likely to have been introduced during the conversion of the source files to man page format. so if something looks cursed, it's probably the conversion's fault, not yours, not mine πŸ™ˆ. To report such errors, see:

https://www.kernel.org/doc/man-pages/reporting_bugs.html

⭐ little recap for the girlies in the back: check your platform (POSIX β‰  Linux guaranteed πŸ’€), the description points you at pthread_mutexattr_getpshared(), and the original standard always eats first.

and that's the whole page, bestie!! this little icon was brought to you by IEEE/The Open Group, 2017, filed under PTHREAD...PSHARED(3POSIX) πŸŒˆπŸ’œ thanks for reading with me, you ate that, mwah πŸŽ€βœ¨