summaryrefslogtreecommitdiff
path: root/ev.pod
diff options
context:
space:
mode:
authorroot <root>2008-04-24 01:42:11 +0000
committerroot <root>2008-04-24 01:42:11 +0000
commit14f0297b13c80647c6e029db35a1aa728ee3c9ae (patch)
tree2e7ae8c1a949babe0a260254f9d7ef58f2171104 /ev.pod
parent5785d8a95f63682d83a1067bd4258fcae9c71764 (diff)
*** empty log message ***
Diffstat (limited to 'ev.pod')
-rw-r--r--ev.pod32
1 files changed, 32 insertions, 0 deletions
diff --git a/ev.pod b/ev.pod
index 513a0c3..77029fa 100644
--- a/ev.pod
+++ b/ev.pod
@@ -3262,6 +3262,38 @@ calling select (O(n²)) will likely make this unworkable.
=back
+=head1 PORTABILITY REQUIREMENTS
+
+In addition to a working ISO-C implementation, libev relies on a few
+additional extensions:
+
+=over 4
+
+=item C<sig_atomic_t volatile> must be thread-atomic as well
+
+The type C<sig_atomic_t volatile> (or whatever is defined as
+C<EV_ATOMIC_T>) must be atomic w.r.t. accesses from different
+threads. This is not part of the specification for C<sig_atomic_t>, but is
+believed to be sufficiently portable.
+
+=item C<sigprocmask> must work in a threaded environment
+
+Libev uses C<sigprocmask> to temporarily block signals. This is not
+allowed in a threaded program (C<pthread_sigmask> has to be used). Typical
+pthread implementations will either allow C<sigprocmask> in the "main
+thread" or will block signals process-wide, both behaviours would
+be compatible with libev. Interaction between C<sigprocmask> and
+C<pthread_sigmask> could complicate things, however.
+
+The most portable way to handle signals is to block signals in all threads
+except the initial one, and run the default loop in the initial thread as
+well.
+
+=back
+
+If you know of other additional requirements drop me a note.
+
+
=head1 AUTHOR
Marc Lehmann <libev@schmorp.de>.