diff -ur docs/reference.html docs/reference.html
--- docs/reference.html Fri Oct 25 19:54:20 2002
+++ docs/reference.html Fri Jan 21 15:14:24 2005
@@ -13,6 +13,7 @@
- st_mutex_t
- st_utime_t
- st_netfd_t
+- st_switch_cb_t
Error Handling
@@ -20,6 +21,8 @@
- st_init()
- st_getfdlimit()
+- st_set_switch_in_cb()
+- st_set_switch_out_cb()
Thread Control and Identification
@@ -244,6 +247,29 @@
+
+st_switch_cb_t
+
+Context switch callback function type.
+
+
Syntax
+
+
+#include <st.h>
+
+typedef void (*st_switch_cb_t)(void);
+
+
+
Description
+
+This datatype is a convenience type for describing a pointer
+to a function that will be called when a thread is set to stop
+or set to run.
+
+
+
+
+
Error Handling
@@ -267,6 +293,8 @@
- st_init()
- st_getfdlimit()
+- st_set_switch_in_cb()
+- st_set_switch_out_cb()
@@ -343,6 +371,41 @@
Description
This function returns the limit on the number of open file descriptors which
is set by the st_init() function.
+
+
+
+
+
+st_set_switch_in_cb()
+
+
+st_set_switch_out_cb()
+
+Set the callback function for thread switches.
+
+
Syntax
+
+
+#include <st.h>
+
+st_switch_cb_t st_set_switch_in_cb(st_switch_cb_t cb);
+st_switch_cb_t st_set_switch_out_cb(st_switch_cb_t cb);
+
+
+
Parameters
+st_set_switch_in_cb() and st_set_switch_out_cb() have the
+following parameter:
+cb
+A function to be called when a thread is resumed and stopped respectively.
+
Returns
+The previous callback function pointer.
+
+
Description
+These functions set the callback for when a thread is resumed and stopped
+respectively. After being called any thread switch will call the callback.
+It is suggested that thread specific data is used to differentiate between
+different threads.
+These functions can be called at any time.