@@ -23,6 +23,34 @@ extern "C" {
*/
/**
+ * Thread type
+ */
+typedef enum odp_thread_type_e {
+ /**
+ * Worker thread
+ *
+ * Worker threads do most part of ODP application packet processing.
+ * These threads provide high packet and data rates, with low and
+ * predictable latency. Typically, worker threads are pinned to isolated
+ * CPUs and packets are processed in a run-to-completion loop with very
+ * low interference from the operating system.
+ */
+ ODP_THREAD_WORKER = 0,
+
+ /**
+ * Control thread
+ *
+ * Control threads do not participate the main packet flow through the
+ * system, but e.g. control or monitor the worker threads, or handle
+ * exceptions. These threads may perform general purpose processing,
+ * use system calls, share the CPU with other threads and be interrupt
+ * driven.
+ */
+ ODP_THREAD_CONTROL
+} odp_thread_type_t;
+
+
+/**
* Get thread identifier
*
* Returns the thread identifier of the current thread. Thread ids range from 0
@@ -47,6 +75,16 @@ int odp_thread_id(void);
int odp_thread_count(void);
/**
+ * Thread type
+ *
+ * Returns the thread type of the current thread.
+ *
+ * @return Thread type
+ */
+odp_thread_type_t odp_thread_type(void);
+
+
+/**
* @}
*/