summaryrefslogtreecommitdiff
path: root/src/shared/macro.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2013-04-16 14:50:05 +0200
committerLennart Poettering <lennart@poettering.net>2013-04-16 14:50:05 +0200
commit49aa47c7fb6c6cf85f2780080e89181974efdc3b (patch)
tree6d0af790210faa80b0cf4d9d565be0d3d629eb51 /src/shared/macro.h
parent6606089752df90f3eeb4924af109046f1c73554c (diff)
util: make generation of profcs PID paths nicer
Diffstat (limited to 'src/shared/macro.h')
-rw-r--r--src/shared/macro.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/shared/macro.h b/src/shared/macro.h
index cca41a3f6a..9bf81dc3cc 100644
--- a/src/shared/macro.h
+++ b/src/shared/macro.h
@@ -66,12 +66,16 @@
#error "Wut? Pointers are neither 4 nor 8 bytes long?"
#endif
+#define ALIGN_PTR(p) ((void*) ALIGN((unsigned long) p))
+#define ALIGN4_PTR(p) ((void*) ALIGN4((unsigned long) p))
#define ALIGN8_PTR(p) ((void*) ALIGN8((unsigned long) p))
static inline size_t ALIGN_TO(size_t l, size_t ali) {
return ((l + ali - 1) & ~(ali - 1));
}
+#define ALIGN_TO_PTR(p, ali) ((void*) ALIGN_TO((unsigned long) p))
+
#define ELEMENTSOF(x) (sizeof(x)/sizeof((x)[0]))
/*