#include <ace/Thread.h > class ACE_Thread {
public:
static ACE_thread_t self (void);
static void self (ACE_hthread_t &t_id);
static void exit (void *status = 0);
static int spawn ( ACE_THR_FUNC func, void *arg = 0, long flags = THR_NEW_LWP, ACE_thread_t *t_id = 0, ACE_hthread_t *t_handle = 0, u_int priority = 0, void *stack = 0, size_t stack_size = 0 );
static int spawn_n ( size_t n, ACE_THR_FUNC func, void *arg = 0, long flags = THR_NEW_LWP, u_int priority = 0, void *stack[] = 0, size_t stack_size[] = 0 );
static int spawn_n ( ACE_thread_t thread_ids[], size_t n, ACE_THR_FUNC func, void *arg, long flags, u_int priority = 0, void *stack[] = 0, size_t stack_size[] = 0 );
static int join (ACE_thread_t, ACE_thread_t * = 0, void ** = 0);
static int join (ACE_hthread_t, void ** = 0);
static int resume (ACE_hthread_t);
static int suspend (ACE_hthread_t);
static int kill (ACE_thread_t, int signum);
static void yield (void);
static void self (ACE_hthread_t &t_id);
static ACE_thread_t self (void);
static void exit (void *status = 0);
static int getconcurrency (void);
static int setconcurrency (int new_level);
static int sigsetmask ( int how, const sigset_t *set, sigset_t *oset = 0 );
static int keycreate (ACE_thread_key_t *keyp, void (*destructor)( void *value), void * = 0 );
static int keyfree (ACE_thread_key_t key);
static int setspecific (ACE_thread_key_t key, void *value);
static int getspecific (ACE_thread_key_t key, void **valuep);
static int disablecancel (struct cancel_state *old_state);
static int enablecancel ( struct cancel_state *old_state, int flag );
static int setcancelstate ( struct cancel_state &new_state, struct cancel_state *old_state );
static int cancel (ACE_thread_t t_id);
static void testcancel (void);
private:
ACE_Thread (void);
ACE_Thread (void);
};
static ACE_thread_t self (void);
static void self (ACE_hthread_t &t_id);
static void exit (void *status = 0);
static int spawn (
ACE_THR_FUNC func,
void *arg = 0,
long flags = THR_NEW_LWP,
ACE_thread_t *t_id = 0,
ACE_hthread_t *t_handle = 0,
u_int priority = 0,
void *stack = 0,
size_t stack_size = 0
);
static int spawn_n (
size_t n,
ACE_THR_FUNC func,
void *arg = 0,
long flags = THR_NEW_LWP,
u_int priority = 0,
void *stack[] = 0,
size_t stack_size[] = 0
);
func
with argument arg
.
If stack
!= 0 it is assumed to be an array of n
pointers to
the base of the stacks to use for the threads being spawned.
Likewise, if stack_size
!= 0 it is assumed to be an array of
n
values indicating how big each of the corresponding stack
s
are. Returns the number of threads actually spawned (if this
doesn't equal the number requested then something has gone wrong
and errno
will explain...).
static int spawn_n (
ACE_thread_t thread_ids[],
size_t n,
ACE_THR_FUNC func,
void *arg,
long flags,
u_int priority = 0,
void *stack[] = 0,
size_t stack_size[] = 0
);
func
with argument arg
.
The thread_ids of successfully spawned threads will be placed
into the thread_ids
buffer, which must be the same size as n
.
If stack
!= 0 it is assumed to be an array of n
pointers to
the base of the stacks to use for the threads being spawned.
Likewise, if stack_size
!= 0 it is assumed to be an array of
n
values indicating how big each of the corresponding stack
s
are. Returns the number of threads actually spawned (if this
doesn't equal the number requested then something has gone wrong
and errno
will explain...).
static int join (ACE_thread_t, ACE_thread_t * = 0, void ** = 0);
static int join (ACE_hthread_t, void ** = 0);
static int resume (ACE_hthread_t);
static int suspend (ACE_hthread_t);
static int kill (ACE_thread_t, int signum);
static void yield (void);
static void self (ACE_hthread_t &t_id);
static ACE_thread_t self (void);
static void exit (void *status = 0);
static int getconcurrency (void);
static int setconcurrency (int new_level);
static int sigsetmask (
int how,
const sigset_t *set,
sigset_t *oset = 0
);
static int keycreate (ACE_thread_key_t *keyp, void (*destructor)(
void *value),
void * = 0
);
keyp
that is used to identify data that is specific
to each thread in the process. The key is global to all threads
in the process.
static int keyfree (ACE_thread_key_t key);
static int setspecific (ACE_thread_key_t key, void *value);
key
, for the calling
thread.
static int getspecific (ACE_thread_key_t key, void **valuep);
key
for the calling thread
into the location pointed to by valuep
.
static int disablecancel (struct cancel_state *old_state);
static int enablecancel (struct cancel_state *old_state, int flag);
static int setcancelstate (
struct cancel_state &new_state,
struct cancel_state *old_state
);
static int cancel (ACE_thread_t t_id);
static void testcancel (void);
ACE_Thread (void);
ACE_Thread (void);