[Xenomai-git] Philippe Gerum : boilerplate: remove potentially conflicting PAGE_SIZE definition
Module: xenomai-3 Branch: next Commit: d723497fb855f31b88e007b283017d9579851b0d URL: http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=d723497fb855f31b88e007b283017d9579851b0d Author: Philippe GerumDate: Sat Apr 15 12:46:58 2017 +0200 boilerplate: remove potentially conflicting PAGE_SIZE definition *libc implementations may define PAGE_SIZE. --- lib/boilerplate/tlsf/tlsf.c |6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/lib/boilerplate/tlsf/tlsf.c b/lib/boilerplate/tlsf/tlsf.c index 2dddc1e..92e651a 100644 --- a/lib/boilerplate/tlsf/tlsf.c +++ b/lib/boilerplate/tlsf/tlsf.c @@ -163,10 +163,6 @@ #define DEFAULT_AREA_SIZE (1024*10) -#ifdef USE_MMAP -#define PAGE_SIZE (getpagesize()) -#endif - #ifdef USE_PRINTF #include # define PRINT_MSG(fmt, args...) printf(fmt, ## args) @@ -418,7 +414,7 @@ static __inline__ void *get_new_area(size_t * size) #if USE_MMAP -*size = ROUNDUP(*size, PAGE_SIZE); +*size = ROUNDUP(*size, getpagesize()); if ((area = __STD(mmap(0, *size, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0))) != MAP_FAILED) return area; #endif ___ Xenomai-git mailing list Xenomai-git@xenomai.org https://xenomai.org/mailman/listinfo/xenomai-git
[Xenomai-git] Philippe Gerum : boilerplate: remove potentially conflicting PAGE_SIZE definition
Module: xenomai-3 Branch: stable-3.0.x Commit: d723497fb855f31b88e007b283017d9579851b0d URL: http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=d723497fb855f31b88e007b283017d9579851b0d Author: Philippe GerumDate: Sat Apr 15 12:46:58 2017 +0200 boilerplate: remove potentially conflicting PAGE_SIZE definition *libc implementations may define PAGE_SIZE. --- lib/boilerplate/tlsf/tlsf.c |6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/lib/boilerplate/tlsf/tlsf.c b/lib/boilerplate/tlsf/tlsf.c index 2dddc1e..92e651a 100644 --- a/lib/boilerplate/tlsf/tlsf.c +++ b/lib/boilerplate/tlsf/tlsf.c @@ -163,10 +163,6 @@ #define DEFAULT_AREA_SIZE (1024*10) -#ifdef USE_MMAP -#define PAGE_SIZE (getpagesize()) -#endif - #ifdef USE_PRINTF #include # define PRINT_MSG(fmt, args...) printf(fmt, ## args) @@ -418,7 +414,7 @@ static __inline__ void *get_new_area(size_t * size) #if USE_MMAP -*size = ROUNDUP(*size, PAGE_SIZE); +*size = ROUNDUP(*size, getpagesize()); if ((area = __STD(mmap(0, *size, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0))) != MAP_FAILED) return area; #endif ___ Xenomai-git mailing list Xenomai-git@xenomai.org https://xenomai.org/mailman/listinfo/xenomai-git