diff options
author | marcus <marcus> | 2005-01-27 18:16:50 +0000 |
---|---|---|
committer | marcus <marcus> | 2005-01-27 18:16:50 +0000 |
commit | 29df4a8e276ede975498c9a727f3d670fa21632d (patch) | |
tree | 8815192b60dce292790c10872cab5358a998e022 /libc | |
parent | 987c46f830a0a865b03cdf47cd86b13c2e6db024 (diff) |
Still trying to revert the file permission flags.
Diffstat (limited to 'libc')
-rw-r--r-- | libc/hurd-l4/sysdeps/l4/getpagesize.c | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/libc/hurd-l4/sysdeps/l4/getpagesize.c b/libc/hurd-l4/sysdeps/l4/getpagesize.c new file mode 100644 index 0000000..4f75a15 --- /dev/null +++ b/libc/hurd-l4/sysdeps/l4/getpagesize.c @@ -0,0 +1,37 @@ +/* Copyright (C) 1991,1993,1995,1996,2002,2005 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include <errno.h> +#include <unistd.h> + +#include <l4/kip.h> + +/* Return the system page size. */ +int +__getpagesize () +{ + void *kip; + int min_page_bit; + + kip = L4_GetKernelInterface (); + min_page_bit = ffs (L4_PageSizeMask (kip)); + + return 1 << (min_page_bit - 1); +} +libc_hidden_def (__getpagesize) +weak_alias (__getpagesize, getpagesize) |