summaryrefslogtreecommitdiff
path: root/src/glibext
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2020-02-04 13:25:08 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2020-02-04 13:25:08 (GMT)
commitfa68ba09820676563ba11f63213168e8e7bfd1d8 (patch)
treeed3bbb0e794a5f241e2961a75ffa61ed29fac914 /src/glibext
parentec0f07c0b9468d6798befd887b02d9668faf806b (diff)
Moved the definition of a lock bit.
Diffstat (limited to 'src/glibext')
-rw-r--r--src/glibext/objhole.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/glibext/objhole.h b/src/glibext/objhole.h
index 184e599..ad28c63 100644
--- a/src/glibext/objhole.h
+++ b/src/glibext/objhole.h
@@ -68,4 +68,27 @@
+/**
+ * Choix du bit de verrou pour le champ "lock".
+ *
+ * Dans la structure exploitant le mot utilisé ici, ce verrou est généralement
+ * placé dans le bit de poids fort pour les objets qui l'utilisent.
+ */
+
+#if __BYTE_ORDER == __LITTLE_ENDIAN
+
+# define HOLE_LOCK_BIT 31
+
+#elif __BYTE_ORDER == __BIG_ENDIAN
+
+# define HOLE_LOCK_BIT 0
+
+#else
+
+# error "Unknown byte order"
+
+#endif
+
+
+
#endif /* _GLIBEXT_OBJHOLE_H */