aboutsummaryrefslogtreecommitdiff
path: root/src/arch/generic/lib.h
blob: 737e795893b5014d9960b4d8cd617aabd4c3801f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/* SPDX-License-Identifier: MIT */

#ifndef __INTERNAL__LIBURING_LIB_H
	#error "This file should be included from src/lib.h (liburing)"
#endif

#ifndef LIBURING_ARCH_GENERIC_LIB_H
#define LIBURING_ARCH_GENERIC_LIB_H

static inline long get_page_size(void)
{
	long page_size;

	page_size = sysconf(_SC_PAGESIZE);
	if (page_size < 0)
		page_size = 4096;

	return page_size;
}

#endif /* #ifndef LIBURING_ARCH_GENERIC_LIB_H */