chiark
/
gitweb
/
~mdw
/
mLib
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
@@@ more mess
[mLib]
/
utils
/
macros.h
diff --git
a/utils/macros.h
b/utils/macros.h
index bc836296e2ca50322286176b570924d222862615..2ca5a06c2d316deb25d98f4baa865f2dbe98f10e 100644
(file)
--- a/
utils/macros.h
+++ b/
utils/macros.h
@@
-61,16
+61,18
@@
#define MLIB__STR(x) #x
#define STR(x) MLIB__STR(x)
#define MLIB__STR(x) #x
#define STR(x) MLIB__STR(x)
-/* --- @GLUE@ --- *
+/* --- @GLUE@
, @GLUE3@
--- *
*
* Arguments: @x, y@ = two sequences of tokens
*
* Arguments: @x, y@ = two sequences of tokens
+ * @z@ = a third sequence of tokens
*
* Returns: A single token formed by gluing together the macro-expansions
*
* Returns: A single token formed by gluing together the macro-expansions
- * of @x@ and @y@.
+ * of @x@ and @y@
, and @z@ for @GLUE3@
.
*/
#define MLIB__GLUE(x, y) x##y
#define GLUE(x, y) MLIB__GLUE(x, y)
*/
#define MLIB__GLUE(x, y) x##y
#define GLUE(x, y) MLIB__GLUE(x, y)
+#define GLUE3(x, y, z) GLUE(x, MLIB__GLUE(y, z))
/* --- @STATIC_ASSERT@ --- *
*
/* --- @STATIC_ASSERT@ --- *
*
@@
-144,6
+146,15
@@
#define UNQUALIFY(type, p) \
CONVERT_CAREFULLY(type *, const volatile type *, p)
#define UNQUALIFY(type, p) \
CONVERT_CAREFULLY(type *, const volatile type *, p)
+/* --- @EMPTY@ --- *
+ *
+ * Arguments: ---
+ *
+ * Returns: The empty token sequence.
+ */
+
+#define EMPTY
+
/* --- @COMMA@ --- *
*
* Arguments: ---
/* --- @COMMA@ --- *
*
* Arguments: ---
@@
-252,10
+263,10
@@
# define LAUNDER(x) \
({ __typeof__(x) _y; __asm__("" : "=g"(_y) : "0"(x)); _y; })
# define ADMIRE(x) \
# define LAUNDER(x) \
({ __typeof__(x) _y; __asm__("" : "=g"(_y) : "0"(x)); _y; })
# define ADMIRE(x) \
- ({ __asm__("" :
: "g"(x)); })
+ ({ __asm__("" :: "g"(x)); })
# define ADMIRE_BUF(p, sz) \
# define ADMIRE_BUF(p, sz) \
- ({ __asm__("" :
: "g"(p), "g"(sz)
); })
-# define RELAX do __asm__
__volatile__("" ::: "memory
"); while (0)
+ ({ __asm__("" :
: "m"(*(unsigned char *)p), "g"(sz) : "memory"
); })
+# define RELAX do __asm__
("
"); while (0)
#endif
#if CLANG_VERSION_P(3, 3)
#endif
#if CLANG_VERSION_P(3, 3)