Asynchronous User Confirm
[platform/upstream/iotivity.git] / resource / c_common / octhread / include / octhread.h
index 95728d1..8f96de8 100644 (file)
@@ -59,7 +59,8 @@ typedef enum
     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;
 
 /**
@@ -103,6 +104,17 @@ OCThreadResult_t oc_thread_free(oc_thread 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