[Caution] Renamed the sleep functions to resolve conflicts with the unistd.h

This commit is contained in:
Maschell 2017-05-07 14:23:02 +02:00
parent d7b44109ac
commit a2f4abdbeb

View File

@ -37,8 +37,9 @@ extern "C" {
#define MILLISECS_TO_TICKS(msec) (SECS_TO_TICKS(msec) / 1000) #define MILLISECS_TO_TICKS(msec) (SECS_TO_TICKS(msec) / 1000)
#define MICROSECS_TO_TICKS(usec) (SECS_TO_TICKS(usec) / 1000000) #define MICROSECS_TO_TICKS(usec) (SECS_TO_TICKS(usec) / 1000000)
#define usleep(usecs) OSSleepTicks(MICROSECS_TO_TICKS(usecs)) //To avoid conflicts with the unistd.h
#define sleep(secs) OSSleepTicks(SECS_TO_TICKS(secs)) #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 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))) #define INVAL_DATA_BLOCK(addr) asm volatile("dcbi 0, %0; sync" : : "r"(((addr) & ~31)))