Test initialisation of MUIA_List_AdjustWidth and MUIA_List_AdjustHeight, and
[AROS.git] / arch / all-unix / kernel / getpagesize.c
blobed0abf1b120c3cae5384bd1b0758b7fc73321848
1 /*
2 Copyright © 2011, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc: Query UNIX host OS for memory page size
6 Lang: english
7 */
9 #include "hostinterface.h"
10 #include "kernel_base.h"
11 #include "kernel_debug.h"
12 #include "kernel_unix.h"
14 unsigned int krnGetPageSize(void *hostlib)
16 int (*getpagesize)(void);
17 char *errstr;
18 int ret;
20 getpagesize = HostIFace->hostlib_GetPointer(hostlib, "getpagesize", &errstr);
21 AROS_HOST_BARRIER
23 if (!getpagesize)
25 krnPanic(NULL, "Failed to obtain memory page size\n"
26 "%s", errstr);
27 return 0;
30 ret = getpagesize();
31 AROS_HOST_BARRIER
33 return ret;