2 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
4 // Get the current group id.
6 ACE_Task_Base::grp_id (void) const
8 ACE_TRACE ("ACE_Task_Base::grp_id");
12 // Set the current group id.
15 ACE_Task_Base::grp_id (int identifier)
17 ACE_TRACE ("ACE_Task_Base::grp_id");
18 ACE_MT (ACE_GUARD (ACE_Thread_Mutex, ace_mon, this->lock_));
20 // Cache the group id in the task and then set it in the
21 // Thread_Manager, if there is one.
22 this->grp_id_ = identifier;
24 this->thr_mgr ()->set_grp (this, identifier);
27 ACE_INLINE ACE_Thread_Manager *
28 ACE_Task_Base::thr_mgr (void) const
30 ACE_TRACE ("ACE_Task_Base::thr_mgr");
31 return this->thr_mgr_;
35 ACE_Task_Base::thr_mgr (ACE_Thread_Manager *thr_mgr)
37 ACE_TRACE ("ACE_Task_Base::thr_mgr");
38 this->thr_mgr_ = thr_mgr;
42 ACE_Task_Base::is_reader (void) const
44 ACE_TRACE ("ACE_Task_Base::is_reader");
45 return (ACE_BIT_ENABLED (this->flags_, ACE_Task_Flags::ACE_READER));
49 ACE_Task_Base::is_writer (void) const
51 ACE_TRACE ("ACE_Task_Base::is_writer");
52 return (ACE_BIT_DISABLED (this->flags_, ACE_Task_Flags::ACE_READER));
55 // Return the count of the current number of threads.
57 ACE_Task_Base::thr_count (void) const
59 ACE_TRACE ("ACE_Task_Base::thr_count");
60 ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, this->lock_, 0));
62 return this->thr_count_;
65 // Return the thread ID of the last thread to exit svc().
66 ACE_INLINE ACE_thread_t
67 ACE_Task_Base::last_thread (void) const
69 ACE_TRACE ("ACE_Task_Base::last_thread");
70 return this->last_thread_id_;
73 ACE_END_VERSIONED_NAMESPACE_DECL