[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[tyndur-devel] [PATCH 5/6] libc: POSIX: getpagesize()



+ libc: POSIX: getpagesize()

Signed-off-by: Kevin Wolf <kevin@xxxxxxxxxx>
---
 src/modules/include/unistd.h |    3 +++
 src/modules/lib/posix/misc.c |    9 +++++++++
 2 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/src/modules/include/unistd.h b/src/modules/include/unistd.h
index cf74c31..97999ac 100644
--- a/src/modules/include/unistd.h
+++ b/src/modules/include/unistd.h
@@ -119,6 +119,9 @@ ssize_t pwrite(int fd, const void *buf, size_t count, off_t offset);
 /// Timer setzen nach dem ein SIGALARM gesendet werden soll
 long alarm(long seconds);
 
+/// Gibt die Groesse einer Page zurueck
+int getpagesize(void);
+
 #ifndef CONFIG_LIBC_NO_STUBS
 /// Prozess klonen
 pid_t fork(void);
diff --git a/src/modules/lib/posix/misc.c b/src/modules/lib/posix/misc.c
index 5ed21ad..4a8496c 100644
--- a/src/modules/lib/posix/misc.c
+++ b/src/modules/lib/posix/misc.c
@@ -30,6 +30,15 @@
 #include <lost/config.h>
 #include <errno.h>
 #include <string.h>
+#include <page.h>
+
+/**
+ * Gibt die Groesse einer Page zurueck
+ */
+int getpagesize(void)
+{
+    return PAGE_SIZE;
+}
 
 #ifndef CONFIG_LIBC_NO_STUBS
 /**
-- 
1.6.0.2