From a7603ebc8c39a3ab205a007f724b87fcd767b4b5 Mon Sep 17 00:00:00 2001 From: "Michael I. Bushnell" Date: Tue, 22 Mar 1994 21:43:46 +0000 Subject: Formerly shared.h.~18~ --- hurd/shared.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'hurd/shared.h') diff --git a/hurd/shared.h b/hurd/shared.h index b74ec003..0911d0f6 100644 --- a/hurd/shared.h +++ b/hurd/shared.h @@ -35,6 +35,24 @@ struct shared_io } conch_status; + /* While you hold the conch, the shared page will not change (except the + conch-status word might be changed from USER_HAS_CONCH to + USER_RELEASE_CONCH). In addition, cooperating users will not change + the contents of the file. The I/O server is a cooperating user itself + in its implementation of io_read, io_write, and so forth. The I/O + server is a separate user from all the shared I/O users. If a user + does not release the conch "promptly" then the conch may be stolen + from that user by the I/O server. "Promptly" will probably mean a few + seconds. + + As a consequence of these rules, if you hold the shared page, io_read + and so forth will block until you release the conch. You cannot + reliably predict what I/O operations in the server (in the io.defs + preceding the comment `Definitions for mapped I/O') might need the + conch, as a consequence, you should normally not call such functions + while you are holding the conch if that could cause a deadlock. */ + + /* These values are set by the IO server only: */ int append_mode; /* append on each write */ -- cgit v1.2.3