aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2016-08-17 14:34:38 +0200
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2019-03-16 19:42:59 +0100
commite87d8ada291d77f065b36c27c0b8c20ab858650b (patch)
tree98658335e46aadcdfaf8e70afc59172b2af26dcb
parent477e739b324349df854209117047779ac3142130 (diff)
downloadglibc-e87d8ada291d77f065b36c27c0b8c20ab858650b.zip
glibc-e87d8ada291d77f065b36c27c0b8c20ab858650b.tar.gz
glibc-e87d8ada291d77f065b36c27c0b8c20ab858650b.tar.bz2
hurd: Document how EINTR should be handled in critical sections
* hurd/hurd/signal.h (_hurd_critical_section_lock): Document how EINTR should be handled.
-rw-r--r--ChangeLog5
-rw-r--r--hurd/hurd/signal.h8
2 files changed, 12 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 3d2bdc8..ce14d88 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2019-03-16 Samuel Thibault <samuel.thibault@ens-lyon.org>
+
+ * hurd/hurd/signal.h (_hurd_critical_section_lock): Document how EINTR
+ should be handled.
+
2019-03-15 Joseph Myers <joseph@codesourcery.com>
* sysdeps/unix/sysv/linux/syscall-names.list: Update kernel
diff --git a/hurd/hurd/signal.h b/hurd/hurd/signal.h
index c30f536..b0b5366 100644
--- a/hurd/hurd/signal.h
+++ b/hurd/hurd/signal.h
@@ -168,7 +168,13 @@ extern int _hurd_core_limit;
A critical section is a section of code which cannot safely be interrupted
to run a signal handler; for example, code that holds any lock cannot be
interrupted lest the signal handler try to take the same lock and
- deadlock result. */
+ deadlock result.
+
+ As a consequence, a critical section will see its RPCs return EINTR, even if
+ SA_RESTART is set! In that case, the critical section should be left, so
+ that the handler can run, and the whole critical section be tried again, to
+ avoid unexpectingly exposing EINTR to the application.
+ */
extern void *_hurd_critical_section_lock (void);