![]()  | 
  
    The Open Master Hearing Aid (openMHA)
    openMHA
    
   Open community platform for hearing aid algorithm research 
   | 
 
Posix threads specification of thread platform. More...

Public Member Functions | |
| void | kick_thread () | 
| Start signal processing in separate thread.  More... | |
| void | catch_thread () | 
| Wait for signal processing to finish.  More... | |
| posix_threads_t (uni_processor_t *proc, const std::string &thread_scheduler, int thread_priority) | |
| Constructor.  More... | |
| ~posix_threads_t () | |
| Terminate thread.  More... | |
| void | main () | 
| Thread main loop. Wait for process/termination trigger, then act.  More... | |
  Public Member Functions inherited from MHAPlugin_Split::thread_platform_t | |
| thread_platform_t (uni_processor_t *proc) | |
| Constructor.  More... | |
| virtual | ~thread_platform_t () | 
| Make derived classes destructable via pointer to this base class.  More... | |
Static Public Member Functions | |
| static void * | thread_start (void *thr) | 
| Thread start function.  More... | |
| static std::string | current_thread_scheduler () | 
| static int | current_thread_priority () | 
Private Attributes | |
| pthread_mutex_t | mutex | 
| The mutex.  More... | |
| pthread_cond_t | kick_condition | 
| The condition for signalling the kicking and termination.  More... | |
| pthread_cond_t | catch_condition | 
| The condition for signalling the processing is finished.  More... | |
| pthread_attr_t | attr | 
| Thread attributes.  More... | |
| struct sched_param | priority | 
| Thread scheduling priority.  More... | |
| int | scheduler | 
| pthread_t | thread | 
| The thread object.  More... | |
| bool | kicked | 
| A flag that is set to true by kick_thread and to false by the thread after it has woken up from the kicking.  More... | |
| bool | processing_done | 
| A flag that is set to true by the thread when it returns from processing and to false by catch_thread after it has waited for that return.  More... | |
| bool | termination_request | 
| Set to true by the destructor.  More... | |
Additional Inherited Members | |
  Protected Attributes inherited from MHAPlugin_Split::thread_platform_t | |
| uni_processor_t * | processor | 
| A pointer to the plugin loader that processes the sound data in the channels for which this thread was created.  More... | |
Posix threads specification of thread platform.
      
  | 
  inline | 
Constructor.
| proc | Pointer to the associated signal processor instance | 
| thread_scheduler | A string describing the posix thread scheduler. Possible values: "SCHED_OTHER", "SCHED_RR", "SCHED_FIFO". | 
| thread_priority | The scheduling priority of the new thread. | 
      
  | 
  inline | 
Terminate thread.
      
  | 
  inlinevirtual | 
Start signal processing in separate thread.
Implements MHAPlugin_Split::thread_platform_t.
      
  | 
  inlinevirtual | 
Wait for signal processing to finish.
Implements MHAPlugin_Split::thread_platform_t.
      
  | 
  inlinestatic | 
Thread start function.
      
  | 
  inline | 
Thread main loop. Wait for process/termination trigger, then act.
      
  | 
  inlinestatic | 
      
  | 
  inlinestatic | 
      
  | 
  private | 
The mutex.
      
  | 
  private | 
The condition for signalling the kicking and termination.
      
  | 
  private | 
The condition for signalling the processing is finished.
      
  | 
  private | 
Thread attributes.
      
  | 
  private | 
Thread scheduling priority.
      
  | 
  private | 
      
  | 
  private | 
The thread object.
      
  | 
  private | 
A flag that is set to true by kick_thread and to false by the thread after it has woken up from the kicking.
      
  | 
  private | 
A flag that is set to true by the thread when it returns from processing and to false by catch_thread after it has waited for that return.
      
  | 
  private | 
Set to true by the destructor.