OC_THREAD_INVALID = 3,
OC_THREAD_WAIT_FAILURE = 4,
OC_THREAD_INVALID_PARAMETER = 5,
- OC_THREAD_CANCEL_FAILURE = 6
+ OC_THREAD_CANCEL_FAILURE = 6,
+ OC_THREAD_DETACH_FAILURE = 7
} OCThreadResult_t;
/**
*/
OCThreadResult_t oc_thread_wait(oc_thread t);
+/**
+ * Detach the thread
+ *
+ * @param[in] t The thread to be detached
+ * @return OCThreadResult_t An enumeration of possible outcomes
+ * @retval OC_THREAD_SUCCESS If the thread successfully detached
+ * @retval OC_THREAD_DETACH_FAILURE If a problem occured while detaching
+ *
+ */
+OCThreadResult_t oc_thread_detach(oc_thread t);
+
#ifdef __TIZEN__
/**
* Cancel the thread without block