thread.h(3)
okay so bestie, you just opened thread.h(3) and it's literally the GNU CommonC++ header that hands you synchronization and threading services. π No cap, this is the whole page, every flag-adjacent thing, every class, every macro. Let's go. π§
πΈ NAME πΈ
thread.h β Synchronization and threading services. That's it, that's the vibe. β¨
π SYNOPSIS π
#include <cc++/config.h>
#include <cc++/string.h>
#include <ctime>
#include <pthread.h>
#include <time.h>
#include <signal.h>
#include <unistd.h>
π«Ά Classes
class ost::Mutexβ protects a section of code so that at any given time only a single thread can perform the protected operation. one. thread. at. a. time. πclass ost::MutexLockβ same job description, same energy: it guards a section of code so only one thread at any given time can run the protected operation. πclass ost::ThreadLockβ implements a thread rwlock for optimal reader performance on systems that have rwlock support, and reverts to a simple mutex on systems that do not. adaptive queen. β¨class ost::ReadLockβ protects a section of code through aThreadLockfor 'read' access to the member function.class ost::WriteLockβ protects a section of code through aThreadLockfor 'write' access to the member function.class ost::MutexCounterβ a counter variable that can safely be incremented or decremented by multiple threads. π¦class ost::AtomicCounterβ offers thread-safe manipulation of an integer counter. iconic behavior only. πclass ost::Conditionalβ a conditional variable synchronization object for one to one and one to many signal and control events between processes.class ost::Semaphoreβ generally used as a synchronization object between multiple threads, or to protect a limited and finite resource such as a memory or thread pool. πclass ost::SemaphoreLockβ protects a section of code through a semaphore so that only x instances of the member function may execute concurrently.class ost::Eventβ implements a feature originally found in the WIN32 API: event notification. β¨class ost::Threadβ every thread of execution in an application is created by instantiating an object of a class derived from theThreadclass. main character energy, literally. πclass ost::Cancellationβ a class to automatically set the thread cancellation mode of a member function.class ost::PosixThreadβ (no description, she's mysterious π)class ost::ThreadKeyβ lets you create a thread context unique 'pointer' that can be set and retrieved, and can be used to create thread specific data areas for implementing 'thread safe' library routines.class ost::TimerPortβ timer ports provide synchronized timing events when managed under a 'service thread' such asSocketService.class ost::SysTimeβ used to access non-reentrant date and time functions in the standard C library. π (yes, non-reentrant, we cope)
π Namespaces
ost
π Macros
#define CCXX_POSIX
#define TIMEOUT_INF ~((timeout_t) 0)
#define ENTER_CRITICAL enterMutex();
#define LEAVE_CRITICAL leaveMutex();
#define ENTER_DEFERRED setCancel(cancelDeferred);
#define LEAVE_DEFERRED setCancel(cancelImmediate);
#define psleep(x) (sleep)(x)
copy these character-for-character bestie, they are Not vibes-based π
π¦ Typedefs
typedef pthread_t cctid_ttypedef unsigned long timeout_t
β Functions
struct timespec * ost::getTimeout (struct timespec *spec, timeout_t timeout)void ost::wait (signo_t signo)Thread * ost::getThread (void)struct tm * ost::localtime_r (const time_t *t, struct tm *b)char * ost::ctime_r (const time_t *t, char *buf)struct tm * ost::gmtime_r (const time_t *t, struct tm *b)char * ost::asctime_r (const struct tm *tm, char *b)
π Variables
class __EXPORT ost::Threadclass __EXPORT ost::ThreadKeyclass __EXPORT ost::Conditionalclass __EXPORT ost::Event
π Detailed Description π
Synchronization and threading services. periodt. π
π Macro Definition Documentation π
#define CCXX_POSIX
yep. it's defined. that's the whole lore. π
#define ENTER_CRITICAL enterMutex();
drop this at the top of your critical section and you're in the club. π
#define ENTER_DEFERRED setCancel(cancelDeferred);
#define LEAVE_CRITICAL leaveMutex();
the matching exit, bestie. always close what you open. π
#define LEAVE_DEFERRED setCancel(cancelImmediate);
#define psleep(x) (sleep)(x)
#define TIMEOUT_INF ~((timeout_t) 0)
the "wait forever" sentinel. iconic. β¨
π Typedef Documentation π
typedef pthread_t cctid_t
typedef unsigned long timeout_t
π«Ά Author π«Ά
Generated automatically by Doxygen for GNU CommonC++ from the source code. (not a human, just a very diligent robot π§)
okay that's the whole page bestie, you ate it π This was GNU CommonC++, dated Sun Dec 27 2020, and yes it really was generated for you by that Doxygen girlie. go forth and thread safely, no cap π¦β¨π
π¦ where this page comes from
- ubuntu jammy: libcommoncpp2-doc 1.8.1-10
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms