From a2f4abdbebedce82e36d10635d25d22038169795 Mon Sep 17 00:00:00 2001 From: Maschell Date: Sun, 7 May 2017 14:23:02 +0200 Subject: [PATCH] [Caution] Renamed the sleep functions to resolve conflicts with the unistd.h --- os_functions.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/os_functions.h b/os_functions.h index 8e1d6c1..ab9d1da 100644 --- a/os_functions.h +++ b/os_functions.h @@ -37,8 +37,9 @@ extern "C" { #define MILLISECS_TO_TICKS(msec) (SECS_TO_TICKS(msec) / 1000) #define MICROSECS_TO_TICKS(usec) (SECS_TO_TICKS(usec) / 1000000) -#define usleep(usecs) OSSleepTicks(MICROSECS_TO_TICKS(usecs)) -#define sleep(secs) OSSleepTicks(SECS_TO_TICKS(secs)) +//To avoid conflicts with the unistd.h +#define os_usleep(usecs) OSSleepTicks(MICROSECS_TO_TICKS(usecs)) +#define os_sleep(secs) OSSleepTicks(SECS_TO_TICKS(secs)) #define FLUSH_DATA_BLOCK(addr) asm volatile("dcbf 0, %0; sync" : : "r"(((addr) & ~31))) #define INVAL_DATA_BLOCK(addr) asm volatile("dcbi 0, %0; sync" : : "r"(((addr) & ~31)))