diff --git a/documentation/README.html b/documentation/README.html index 2194982..32c99da 100644 --- a/documentation/README.html +++ b/documentation/README.html @@ -57,11 +57,13 @@ when it starts up. This is controlled via the __stack_size variable (se
I added some amiga.lib and debug.lib functionality to the library, but don't count on it to be complete.
+The library code is supposed to be thread-safe if built with the __THREAD_SAFE preprocesssor symbold defined. Note that 'thread-safe' does not mean 'reentrant'. Multiple callers for certain library functions are permitted, but not for all of them. For example, mkdtemp() is not thread-safe, and neither is -rand() or localtime(). But as per POSIX 1003.1c-1995 there are thread-safe +rand() or localtime(). But as per POSIX 1003.1c-1995 there are thread-safe variants of rand() and localtime() called rand_r(), localtime_r(), and others. The use of the socket I/O functions is still problematic because the underlying bsdsocket.library API is not supposed to be used by any process @@ -71,10 +73,19 @@ error code left by the last caller.
Take care: thread-safety does not imply that you can have multiple callers access and close the same file. There is no resource tracking to that degree -yet. All the thread-safety tries to afford you is not to get into big trouble +yet. All that the thread-safety tries to afford you is not to get into big trouble if simultaneous and overlapping accesses to files, memory allocation and other resources are taking place.
+Also take care with file I/O involving the stdin/stdout/stderr +streams; read/write operations on these streams will be mapped to the Input()/Output()/ErrorOutput() +file handles of the process performing these operations. Since only this small set of +operations is mapped, functions such as fcntl() or select() will not +work on the stdin/stdout/stderr streams and the corresponding +file descriptors STDIN_FILENO/STDOUT_FILENO/STDERR_FILENO. +It is therefore strongly recommended to use the thread-safe library only for applications +which can cope with the limitations described above.
+