You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
641 B
33 lines
641 B
#ifndef PICO_SUPPORT_LINUX |
|
#define PICO_SUPPORT_LINUX |
|
|
|
#include "linux/types.h" |
|
#include "linux/mm.h" |
|
#include "linux/slab.h" |
|
#include "linux/jiffies.h" |
|
|
|
#define dbg printk |
|
|
|
#define pico_zalloc(x) kcalloc(x, 1, GFP_ATOMIC) /* All allocations are GFP_ATOMIC for now */ |
|
#define pico_free(x) kfree(x) |
|
|
|
|
|
static inline unsigned long PICO_TIME(void) |
|
{ |
|
return (unsigned long)(jiffies_to_msecs(jiffies) / 1000); |
|
} |
|
|
|
static inline unsigned long PICO_TIME_MS(void) |
|
{ |
|
return (unsigned long)jiffies_to_msecs(jiffies); |
|
} |
|
|
|
static inline void PICO_IDLE(void) |
|
{ |
|
unsigned long now = jiffies; |
|
while (now == jiffies) { |
|
; |
|
} |
|
} |
|
|
|
#endif
|
|
|