Fennel: AioSignalHandlerThread Class Reference (original) (raw)
Inheritance diagram for AioSignalHandlerThread:

| Public Member Functions | |
|---|---|
| AioSignalHandlerThread (AioSignalScheduler &schedulerInit) | |
| virtual void | run () |
| virtual void | start () |
| Spawns the OS thread. | |
| void | join () |
| Waits for the OS thread to terminate. | |
| bool | isStarted () const |
| **Returns:**true if start has been called (and subsequent join has not completed) | |
| bool | isStopped () const |
| **Returns:**opposite of isStarted() | |
| boost::thread & | getBoostThread () |
| Accesses the underlying boost::thread, e.g. | |
| std::string | getName () |
| void | setName (std::string const &s) |
| Protected Member Functions | |
| void | initAndRun () |
| virtual void | beforeRun () |
| virtual void | afterRun () |
| Protected Attributes | |
| boost::thread * | pBoostThread |
| bool | bRunning |
| std::string | name |
| Private Attributes | |
| AioSignalScheduler & | scheduler |
Detailed Description
Definition at line 38 of file AioSignalScheduler.cpp.
Constructor & Destructor Documentation
| AioSignalHandlerThread::AioSignalHandlerThread | ( | AioSignalScheduler & | schedulerInit | ) | [inline] |
|---|
Member Function Documentation
| void AioSignalHandlerThread::run | ( | | ) | [virtual] | | -------------------------------- | - | | - | ----------- |
Implements Thread.
Definition at line 156 of file AioSignalScheduler.cpp.
References AioSignalScheduler::quit, and scheduler.
00157 {
00158 int rc;
00159
00160
00161 sigset_t mask;
00162 sigemptyset(&mask);
00163 sigaddset(&mask,SIGRTMIN);
00164 rc = pthread_sigmask(SIG_UNBLOCK,&mask,NULL);
00165 assert(!rc);
00166
00167
00168
00169 #ifdef sun
00170 int policy;
00171 sched_param param;
00172 rc = pthread_getschedparam(pthread_self(),&policy,¶m);
00173 assert(!rc);
00174 param.sched_priority++;
00175 rc = pthread_setschedparam(pthread_self(),SCHED_RR,¶m);
00176 assert(!rc);
00177 #endif
00178
00179
00180
00181 while (.quit) {
00182 sleep(1);
00183 }
00184 }
| void Thread::initAndRun | ( | | ) | [protected, inherited] | | ----------------------- | - | | - | ------------------------ |
| void Thread::beforeRun | ( | | ) | [protected, virtual, inherited] | | ---------------------- | - | | - | --------------------------------- |
| void Thread::afterRun | ( | | ) | [protected, virtual, inherited] | | --------------------- | - | | - | --------------------------------- |
| void Thread::start | ( | | ) | [virtual, inherited] | | ------------------ | - | | - | ---------------------- |
| void Thread::join | ( | | ) | [inherited] | | ----------------- | - | | - | ------------- |
| bool Thread::isStarted | ( | | ) | const [inline, inherited] | | ---------------------- | - | | - | --------------------------- |
| bool Thread::isStopped | ( | | ) | const [inline, inherited] | | ---------------------- | - | | - | --------------------------- |
| boost::thread& Thread::getBoostThread | ( | | ) | [inline, inherited] | | ------------------------------------- | - | | - | --------------------- |
Accesses the underlying boost::thread, e.g.
for use in a boost::thread_group. This thread must already be started.
Returns:
the underlying boost::thread
Definition at line 90 of file Thread.h.
| std::string Thread::getName | ( | | ) | [inline, inherited] | | --------------------------- | - | | - | --------------------- |
Definition at line 96 of file Thread.h.
00097 { 00098 return name; 00099 }
| void Thread::setName | ( | std::string const & | s | ) | [inline, inherited] |
|---|
Member Data Documentation
The documentation for this class was generated from the following file:
- /home/pub/open/dev/fennel/device/AioSignalScheduler.cpp
