summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
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"