forked from amir/filehasher
Linux porting
Porting to linux Reorganising the code Improving the scan function
This commit is contained in:
6
base.h
6
base.h
@@ -146,6 +146,9 @@ static void plat_sem_destroy(plat_sem *s) {
|
||||
}
|
||||
}
|
||||
|
||||
// Sleep
|
||||
static void sleep_ms(int ms) { Sleep(ms); }
|
||||
|
||||
#elif defined(__linux__)
|
||||
|
||||
// Memory allocation
|
||||
@@ -211,4 +214,7 @@ static void plat_sem_post(plat_sem *s, u32 count) {
|
||||
|
||||
static void plat_sem_destroy(plat_sem *s) { sem_destroy(&s->sem); }
|
||||
|
||||
// Sleep
|
||||
static void sleep_ms(int ms) { usleep(ms * 1000); }
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user