ucommon
7.0.0
About: GNU uCommon C++ is a portable and optimized class framework for writing C++ applications that need to use threads and support concurrent synchronization, and that use sockets, XML parsing, object serialization, thread-optimized string and data structure classes, etc.. Fossies Dox: ucommon-7.0.0.tar.gz ("inofficial" and yet experimental doxygen-generated source code documentation) 
|
Go to the documentation of this file. 43 #ifndef _UCOMMON_THREAD_H_ 44 #define _UCOMMON_THREAD_H_ 46 #ifndef _UCOMMON_CPR_H_ 50 #ifndef _UCOMMON_ACCESS_H_ 54 #ifndef _UCOMMON_TIMERS_H_ 58 #ifndef _UCOMMON_MEMORY_H_ 62 #ifndef _UCOMMON_CONDITION_H_ 130 reader(
const void *
object);
142 void set(
const void *
object);
193 writer(
const void *
object);
205 void set(
const void *
object);
256 static void indexing(
unsigned size);
262 static bool release(
const void *
object);
487 pthread_mutex_lock(&
mlock);
494 pthread_mutex_lock(&
mlock);
501 pthread_mutex_unlock(&
mlock);
508 pthread_mutex_unlock(&
mlock);
515 inline static void acquire(pthread_mutex_t *lock) {
516 pthread_mutex_lock(lock);
523 inline static void release(pthread_mutex_t *lock) {
524 pthread_mutex_unlock(lock);
533 static void indexing(
unsigned size);
540 static bool protect(
const void *
pointer);
546 static bool release(
const void *
pointer);
576 void set(
const void *
object);
595 inline operator bool()
const {
596 return object != NULL;
600 return object == NULL;
612 inline void set(
const T *
object) {
626 return static_cast<T*>(
object);
631 return *(static_cast<T*>(
object));
658 enum {R_UNUSED} reserved;
679 virtual bool is_active(
void)
const;
695 virtual void release(
void *instance) = 0;
697 virtual void *allocate();
704 void set(
void *instance);
719 void setPriority(
void);
725 static void yield(
void);
744 virtual void run(
void) = 0;
759 virtual void exit(
void);
764 static void init(
void);
769 static size_t cache(
void);
776 static void policy(
int polid);
782 static void concurrency(
int level);
790 static bool equal(pthread_t thread1, pthread_t thread2);
796 static pthread_t
self(void);
798 inline operator bool()
const {
810 static void release(
void);
869 void start(
int priority = 0);
929 void start(
int priority = 0);
952 #define __AUTOLOCK(x) autolock __autolock__(x) 953 #define __AUTOPROTECT(x) AutoProtect __autolock__(x) 954 #define __SYNC(x) for(bool _sync_flag_ = Mutex::protect(x); _sync_flag_; _sync_flag_ = !Mutex::release(x))
ReusableObject * freelist
static pthread_mutex_t mlock
bool isRunning(void) const
static void acquire(pthread_mutex_t *lock)
void operator=(const void *pointer)
static void release(pthread_mutex_t *lock)
void set(const void *object)
autoprotect(const T *object)
autoshared< RWLock > autoreader
autoexclusive< RWLock > autowriter
void operator=(const void *pointer)
ReusableObject * next(ReusableObject *object)
static shell::numericopt timeout('t', "--timeout", _TEXT("optional keyboard input timeout"), "seconds", 0)
autoprotect & operator=(const T *object)
void set(const T *object)
autoexclusive< Mutex > autolock
static LinkedObject * list
static const timeout_t inf
autoexclusive< RecursiveMutex > autolock
ReusableObject * getNext(void)