My Project
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros
Macros | Functions
output_thread.h File Reference

A dedos_thread which monitors a queue for output to be sent to other runtimes or the global controller. More...

#include "dedos_threads.h"
#include "thread_message.h"

Go to the source code of this file.

Macros

#define OUTPUT_THREAD_ID   -1
 A thread_msg marked for delivery to this thread ID will be enqueued to the output thread. More...
 

Functions

int enqueue_for_output (struct thread_msg *thread_msg)
 Enqueues a thread_msg for delivery to the output thread. More...
 
void stop_output_monitor ()
 Triggers the output thread to stop execution. More...
 
void join_output_thread ()
 Joins the underlying pthread. More...
 
struct dedos_threadstart_output_monitor_thread (void)
 Starts the thread monitoring the queue for messages to be sent to other endpoints. More...
 

Detailed Description

A dedos_thread which monitors a queue for output to be sent to other runtimes or the global controller.

Definition in file output_thread.h.

Macro Definition Documentation

#define OUTPUT_THREAD_ID   -1

A thread_msg marked for delivery to this thread ID will be enqueued to the output thread.

Definition at line 35 of file output_thread.h.

Function Documentation

int enqueue_for_output ( struct thread_msg thread_msg)

Enqueues a thread_msg for delivery to the output thread.

Message should be of type CONNECT_TO_RUNTIME, SEND_TO_PEER, or SEND_TO_CTRL.

Returns
0 on success, -1 on error

Definition at line 213 of file output_thread.c.

void join_output_thread ( )

Joins the underlying pthread.

Definition at line 90 of file output_thread.c.

struct dedos_thread* start_output_monitor_thread ( void  )

Starts the thread monitoring the queue for messages to be sent to other endpoints.

Definition at line 223 of file output_thread.c.

void stop_output_monitor ( )

Triggers the output thread to stop execution.

Definition at line 86 of file output_thread.c.