partially-working picoTCP integration

This commit is contained in:
Joseph Henry
2016-10-14 14:03:06 -07:00
parent d9033ba2f3
commit 8514c6bcab
164 changed files with 47767 additions and 56 deletions

View File

@@ -0,0 +1,33 @@
#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