summaryrefslogtreecommitdiffstats
path: root/macro.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2007-05-14 17:07:21 +0000
committerLennart Poettering <lennart@poettering.net>2007-05-14 17:07:21 +0000
commita68ee34ebfbbc6e6bc653aadc284264e10694930 (patch)
treef092f59607e6bb2e543cd9ec28619fd4f60cf3e5 /macro.h
parentc7940f68a29e90b5cdc7368ec62ffeaeeca8208e (diff)
add bufferq structure
git-svn-id: file:///home/lennart/svn/public/libsydney/trunk@17 9ba3c220-e4d3-45a2-8aa3-73fcc9aff6ce
Diffstat (limited to 'macro.h')
-rw-r--r--macro.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/macro.h b/macro.h
index 368555d..847bf97 100644
--- a/macro.h
+++ b/macro.h
@@ -39,4 +39,10 @@
#define MIN(a, b) ((a) < (b) ? (a) : (b))
#endif
+static inline size_t align(size_t l) {
+ return (((l + sizeof(void*) - 1) / sizeof(void*)) * sizeof(void*));
+}
+
+#define ALIGN(x) (align(x))
+
#endif