summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorAndreas Klebinger <klebinger.andreas@gmx.at>2020-06-22 13:48:52 +0200
committerBen Gamari <ben@smart-cactus.org>2020-07-15 16:41:03 -0400
commit6a533d2afaab8b8ca0026c9af1a8ed9ff09c4462 (patch)
treee8adc75b7fce82c3431347669204a90139344c27 /includes
parentf8d39a510c563271e26ec7175b8e538d0b6809da (diff)
downloadhaskell-6a533d2afaab8b8ca0026c9af1a8ed9ff09c4462.tar.gz
winio: add a note about file locking in the RTS.
Diffstat (limited to 'includes')
-rw-r--r--includes/rts/FileLock.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/includes/rts/FileLock.h b/includes/rts/FileLock.h
index 84f1f63881..baf9f680fb 100644
--- a/includes/rts/FileLock.h
+++ b/includes/rts/FileLock.h
@@ -11,6 +11,22 @@
*
* ---------------------------------------------------------------------------*/
+/* Note [RTS File locking]
+ * ~~~~~~~~~~~~~~~~~~~~~~~
+ *
+ * The Haskell report dictates certain file locking behaviour.
+ * This is specified in the Haskell98 report under: 21.2.3 File locking
+ *
+ * GHC does not rely on the platform it's on to implement this.
+ * Instead we keep track of locked files in a data structure in
+ * the RTS. This file provides the interface to this data structure.
+ *
+ * In the base librarie we then use this interface to "lock" files.
+ * This means it's very much still possible for users outside of the
+ * rts/base library to open the files in question even if they are
+ * locked.
+ * */
+
#pragma once
#include "Stg.h"