summaryrefslogtreecommitdiff
path: root/src/util.h
diff options
context:
space:
mode:
authorcee1 <fykcee1@gmail.com>2011-03-18 10:03:41 +0800
committerLennart Poettering <lennart@poettering.net>2011-03-28 21:42:31 +0200
commit37f85e66e8f396b6f758e063531b95531aef628e (patch)
tree4c914f49c19d6712b76fc1be5f58929a2aa9d5bc /src/util.h
parentf9276855a1d270b6c3f857cdaf2c4b49920c2228 (diff)
util: detect page size runtime.
Some architectures support multiple machine types with diffenent page sizes, and some machine types even support multiple page sizes themselves.
Diffstat (limited to 'src/util.h')
-rw-r--r--src/util.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/util.h b/src/util.h
index 192ebff1fa..04afc731e9 100644
--- a/src/util.h
+++ b/src/util.h
@@ -83,6 +83,9 @@ struct timespec *timespec_store(struct timespec *ts, usec_t u);
usec_t timeval_load(const struct timeval *tv);
struct timeval *timeval_store(struct timeval *tv, usec_t u);
+size_t page_size(void);
+#define PAGE_ALIGN(l) ALIGN_TO((l), page_size())
+
#define streq(a,b) (strcmp((a),(b)) == 0)
#define strneq(a, b, n) (strncmp((a), (b), (n)) == 0)