]> mj.ucw.cz Git - libucw.git/commitdiff
Documented thread safety of ucwlib functions.
authorMartin Mares <mj@ucw.cz>
Wed, 20 Sep 2006 14:35:12 +0000 (16:35 +0200)
committerMartin Mares <mj@ucw.cz>
Wed, 20 Sep 2006 14:35:12 +0000 (16:35 +0200)
lib/THREADS [new file with mode: 0644]

diff --git a/lib/THREADS b/lib/THREADS
new file mode 100644 (file)
index 0000000..1cb77b6
--- /dev/null
@@ -0,0 +1,10 @@
+Generally, functions in the UCW library are reentrant as long as you call them
+on different data. Calling on the same object is not, unless otherwise told,
+which also includes functions acting on any kind of global state.
+
+There are some exceptions:
+
+- logging functions are safe as long as you don't switch log files
+- setproctitle() is not safe, it modifies global state
+- handle_signal() is not safe, it modifies global state
+- stk_printf() is not safe, it currently uses a global buffer (FIXME!)