9
0
Fork 0

extend barebox wrapper header

Add empty definitions for mutexes, spinlocks and other stuff from
the kernel to make it easier to reuse code from the kernel.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
Sascha Hauer 2013-07-25 10:36:12 +02:00
parent be442d717e
commit bbaa8f1bb6
1 changed files with 32 additions and 0 deletions

View File

@ -34,4 +34,36 @@ typedef int gfp_t;
#define MODULE_DESCRIPTION(x)
#define MODULE_LICENSE(x)
typedef int spinlock_t;
#define spin_lock_init(...)
#define spin_lock(...)
#define spin_unlock(...)
#define mutex_init(...)
#define mutex_lock(...)
#define mutex_unlock(...)
struct mutex { int i; };
struct rw_semaphore { int i; };
#define __user
#define __init
#define __exit
#define init_rwsem(...) do { } while (0)
#define down_read(...) do { } while (0)
#define down_write(...) do { } while (0)
#define down_write_trylock(...) 1
#define up_read(...) do { } while (0)
#define up_write(...) do { } while (0)
#define kthread_create(...) __builtin_return_address(0)
#define kthread_stop(...) do { } while (0)
#define wake_up_process(...) do { } while (0)
typedef int wait_queue_head_t;
#define cond_resched() do { } while (0)
#define init_waitqueue_head(...) do { } while (0)
#endif /* __INCLUDE_LINUX_BAREBOX_WRAPPER_H */