Porting Toolkit to Symbian. It should work while some sporadic
[silc.git] / lib / silcutil / silcthread.h
index c1ecf92d4801e0b58c45c9d0a9f1b1ba5d2057a7..3a4036f6459ee1c5a3d8a0742fe6fd3f8bf80ab1 100644 (file)
@@ -72,7 +72,7 @@ typedef void *(*SilcThreadStart)(void *context);
  * SYNOPSIS
  *
  *    SilcThread silc_thread_create(SilcThreadStart start_func,
- *                                  void *context, bool waitable);
+ *                                  void *context, SilcBool waitable);
  * DESCRIPTION
  *
  *    Creates a new thread. The `start_func' with `context' will be
@@ -92,9 +92,13 @@ typedef void *(*SilcThreadStart)(void *context);
  *    If the `waitable' is TRUE then another thread must always issue
  *    silc_thread_wait to avoid memory leaks.
  *
+ *    On Symbian Cleanup Stack is created and new Active Scheduler is
+ *    installed automatically for the created thread.  The thread also
+ *    shares heap with the calling thread.
+ *
  ***/
 SilcThread silc_thread_create(SilcThreadStart start_func, void *context,
-                             bool waitable);
+                             SilcBool waitable);
 
 /****f* silcutil/SilcThreadAPI/silc_thread_exit
  *
@@ -130,7 +134,7 @@ SilcThread silc_thread_self(void);
  *
  * SYNOPSIS
  *
- *    bool silc_thread_wait(SilcThread thread, void **exit_value);
+ *    SilcBool silc_thread_wait(SilcThread thread, void **exit_value);
  *
  * DESCRIPTION
  *
@@ -142,6 +146,20 @@ SilcThread silc_thread_self(void);
  *    FALSE value.
  *
  ***/
-bool silc_thread_wait(SilcThread thread, void **exit_value);
+SilcBool silc_thread_wait(SilcThread thread, void **exit_value);
+
+/****f* silcutil/SilcThreadAPI/silc_thread_yield
+ *
+ * SYNOPSIS
+ *
+ *    void silc_thread_yield(void);
+ *
+ * DESCRIPTION
+ *
+ *    Yield the processor.  The calling thread will yield the processor and
+ *    give execution time for other threads, until its turn comes up again.
+ *
+ ***/
+void silc_thread_yield(void);
 
 #endif