diff options
author | levine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-10-03 14:18:35 +0000 |
---|---|---|
committer | levine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-10-03 14:18:35 +0000 |
commit | 367b04e5a6539ae072c9d7bbe0bd9c536df91f32 (patch) | |
tree | e0bd9c57c35d1ccafccc71980b8c250f55b607f4 /ace | |
parent | 13f769b41b41d1e3746003d237cb80c1930a6cc4 (diff) | |
download | ATCD-367b04e5a6539ae072c9d7bbe0bd9c536df91f32.tar.gz |
added THR_JOINABLE to THR_NEW_LWP in default flags
Diffstat (limited to 'ace')
-rw-r--r-- | ace/Task.h | 2 | ||||
-rw-r--r-- | ace/Thread.h | 100 | ||||
-rw-r--r-- | ace/Thread_Manager.h | 6 | ||||
-rw-r--r-- | ace/Timer_Queue_Adapters.h | 2 |
4 files changed, 55 insertions, 55 deletions
diff --git a/ace/Task.h b/ace/Task.h index a6e05cb6f65..4ea22b4e9ab 100644 --- a/ace/Task.h +++ b/ace/Task.h @@ -94,7 +94,7 @@ public: // Run by a daemon thread to handle deferred processing. // = Active object activation method. - virtual int activate (long flags = THR_NEW_LWP, + virtual int activate (long flags = THR_NEW_LWP | THR_JOINABLE, int n_threads = 1, int force_active = 0, long priority = ACE_DEFAULT_THREAD_PRIORITY, diff --git a/ace/Thread.h b/ace/Thread.h index 9123b704a90..c5b028c1360 100644 --- a/ace/Thread.h +++ b/ace/Thread.h @@ -5,13 +5,13 @@ // // = LIBRARY // ace -// +// // = FILENAME -// Thread.h +// Thread.h // // = AUTHOR -// Doug Schmidt -// +// Doug Schmidt +// // ============================================================================ #if !defined (ACE_THREAD_H) @@ -30,17 +30,17 @@ class ACE_Export ACE_Thread // threads, or pSoS threads. Note, however, that it is // generally a better idea to use the <ACE_Thread_Manager> // programming API rather than the <ACE_Thread> API since the - // thread manager is more powerful. + // thread manager is more powerful. public: - 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, - long priority = ACE_DEFAULT_THREAD_PRIORITY, - void *stack = 0, - size_t stack_size = 0, - ACE_Thread_Adapter *thread_adapter = 0); + static int spawn (ACE_THR_FUNC func, + void *arg = 0, + long flags = THR_NEW_LWP | THR_JOINABLE, + ACE_thread_t *t_id = 0, + ACE_hthread_t *t_handle = 0, + long priority = ACE_DEFAULT_THREAD_PRIORITY, + void *stack = 0, + size_t stack_size = 0, + ACE_Thread_Adapter *thread_adapter = 0); // Creates a new thread having <flags> attributes and running <func> // with <args> (if <thread_adapter> is non-0 then <func> and <args> // are ignored and are obtained from <thread_adapter>). <thr_id> @@ -55,7 +55,7 @@ public: // THR_SUSPENDED, THR_DAEMON, THR_JOINABLE, THR_SCHED_FIFO, // THR_SCHED_RR, THR_SCHED_DEFAULT // = END<INDENT> - // + // // By default, or if <priority> is set to // ACE_DEFAULT_THREAD_PRIORITY, an "appropriate" priority value for // the given scheduling policy (specified in <flags}>, e.g., @@ -69,14 +69,14 @@ public: // Note that <thread_adapter> is always deleted by <thr_create>, // therefore it must be allocated with global operator new. - static int spawn_n (size_t n, - ACE_THR_FUNC func, - void *arg = 0, - long flags = THR_NEW_LWP, - long priority = ACE_DEFAULT_THREAD_PRIORITY, - void *stack[] = 0, - size_t stack_size[] = 0, - ACE_Thread_Adapter *thread_adapter = 0); + static int spawn_n (size_t n, + ACE_THR_FUNC func, + void *arg = 0, + long flags = THR_NEW_LWP | THR_JOINABLE, + long priority = ACE_DEFAULT_THREAD_PRIORITY, + void *stack[] = 0, + size_t stack_size[] = 0, + ACE_Thread_Adapter *thread_adapter = 0); // Spawn N new threads, which execute <func> with argument <arg> (if // <thread_adapter> is non-0 then <func> and <args> are ignored and // are obtained from <thread_adapter>). If <stack> != 0 it is @@ -90,16 +90,16 @@ public: // // See also <spawn>. - static int spawn_n (ACE_thread_t thread_ids[], - size_t n, - ACE_THR_FUNC func, - void *arg, - long flags, - long priority = ACE_DEFAULT_THREAD_PRIORITY, - void *stack[] = 0, - size_t stack_size[] = 0, - ACE_hthread_t thread_handles[] = 0, - ACE_Thread_Adapter *thread_adapter = 0); + static int spawn_n (ACE_thread_t thread_ids[], + size_t n, + ACE_THR_FUNC func, + void *arg, + long flags, + long priority = ACE_DEFAULT_THREAD_PRIORITY, + void *stack[] = 0, + size_t stack_size[] = 0, + ACE_hthread_t thread_handles[] = 0, + ACE_Thread_Adapter *thread_adapter = 0); // Spawn <n> new threads, which execute <func> with argument <arg> // (if <thread_adapter> is non-0 then <func> and <args> are ignored // and are obtained from <thread_adapter>). The thread_ids of @@ -118,16 +118,16 @@ public: // See also <spawn>. static int join (const ACE_Thread_ID &, - void **status = 0); + void **status = 0); // Wait for one or more threads to exit. static int join (ACE_thread_t, - ACE_thread_t *, - void **status = 0); + ACE_thread_t *, + void **status = 0); // Wait for one or more threads to exit. - static int join (ACE_hthread_t, - void ** = 0); + static int join (ACE_hthread_t, + void ** = 0); // Wait for one thread to exit. static int resume (ACE_hthread_t); @@ -166,18 +166,18 @@ public: static int setconcurrency (int new_level); // Set the LWP concurrency level of the process. - static int sigsetmask (int how, - const sigset_t *sigset, + static int sigsetmask (int how, + const sigset_t *sigset, sigset_t *osigset = 0); // Change and/or examine calling thread's signal mask. static int keycreate (ACE_thread_key_t *keyp, #if defined (ACE_HAS_THR_C_DEST) - ACE_THR_C_DEST destructor, + ACE_THR_C_DEST destructor, #else - ACE_THR_DEST destructor, + ACE_THR_DEST destructor, #endif /* ACE_HAS_THR_C_DEST */ - void * = 0); + void * = 0); // Allocates a <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. @@ -185,25 +185,25 @@ public: static int keyfree (ACE_thread_key_t key); // Free up the key so that other threads can reuse it. - static int setspecific (ACE_thread_key_t key, - void *value); + static int setspecific (ACE_thread_key_t key, + void *value); // Bind value to the thread-specific data key, <key>, for the calling // thread. - static int getspecific (ACE_thread_key_t key, - void **valuep); + static int getspecific (ACE_thread_key_t key, + void **valuep); // Stores the current value bound to <key> for the calling thread // into the location pointed to by <valuep>. static int disablecancel (struct cancel_state *old_state); // Disable thread cancellation. - static int enablecancel (struct cancel_state *old_state, - int flag); + static int enablecancel (struct cancel_state *old_state, + int flag); // Enable thread cancellation. static int setcancelstate (struct cancel_state &new_state, - struct cancel_state *old_state); + struct cancel_state *old_state); // Set the cancellation state. static int cancel (ACE_thread_t t_id); diff --git a/ace/Thread_Manager.h b/ace/Thread_Manager.h index fd90982e6c4..57b8505fceb 100644 --- a/ace/Thread_Manager.h +++ b/ace/Thread_Manager.h @@ -413,7 +413,7 @@ public: int spawn (ACE_THR_FUNC func, void *args = 0, - long flags = THR_NEW_LWP, + long flags = THR_NEW_LWP | THR_JOINABLE, ACE_thread_t * = 0, ACE_hthread_t *t_handle = 0, long priority = ACE_DEFAULT_THREAD_PRIORITY, @@ -427,7 +427,7 @@ public: int spawn_n (size_t n, ACE_THR_FUNC func, void *args = 0, - long flags = THR_NEW_LWP, + long flags = THR_NEW_LWP | THR_JOINABLE, long priority = ACE_DEFAULT_THREAD_PRIORITY, int grp_id = -1, ACE_Task_Base *task = 0, @@ -752,7 +752,7 @@ protected: // Set the cancellation flag for the thread described in <tda>. int register_as_terminated (ACE_Thread_Descriptor *td); - // Register a thread as terminated and put it into the <terminated_thr_list_>. + // Register a thread as terminated and put it into the <terminated_thr_list_>. ACE_Double_Linked_List<ACE_Thread_Descriptor> thr_list_; // Keeping a list of thread descriptors within the thread manager. diff --git a/ace/Timer_Queue_Adapters.h b/ace/Timer_Queue_Adapters.h index 4eda1315222..9720b9e1c66 100644 --- a/ace/Timer_Queue_Adapters.h +++ b/ace/Timer_Queue_Adapters.h @@ -123,7 +123,7 @@ public: ACE_thread_t thr_id (void); // Return the thread id of our active object. - virtual int activate (long flags = THR_NEW_LWP, + virtual int activate (long flags = THR_NEW_LWP | THR_JOINABLE, int n_threads = 1, int force_active = 0, long priority = ACE_DEFAULT_THREAD_PRIORITY, |