mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH 6/8] extend barebox wrapper header
Date: Tue,  6 Aug 2013 15:07:06 +0200	[thread overview]
Message-ID: <1375794428-29577-7-git-send-email-s.hauer@pengutronix.de> (raw)
In-Reply-To: <1375794428-29577-1-git-send-email-s.hauer@pengutronix.de>

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>
---
 include/linux/barebox-wrapper.h | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)

diff --git a/include/linux/barebox-wrapper.h b/include/linux/barebox-wrapper.h
index 1ba4e32..753fb52 100644
--- a/include/linux/barebox-wrapper.h
+++ b/include/linux/barebox-wrapper.h
@@ -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 */
-- 
1.8.4.rc1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  parent reply	other threads:[~2013-08-06 13:07 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-06 13:07 [PATCH] UBIFS support Sascha Hauer
2013-08-06 13:07 ` [PATCH 1/8] mtd: ubi: add missing prototype for ubi_volume_notify Sascha Hauer
2013-08-06 13:07 ` [PATCH 2/8] mtd: ubi: add ubi info functions Sascha Hauer
2013-08-06 13:07 ` [PATCH 3/8] filetype: Add ubifs detection Sascha Hauer
2013-08-06 13:07 ` [PATCH 4/8] mtd: ubi: Add support for opening a volume by cdev Sascha Hauer
2013-08-06 13:07 ` [PATCH 5/8] move print_hex_dump function to include/common.h Sascha Hauer
2013-08-06 13:07 ` Sascha Hauer [this message]
2013-08-06 13:07 ` [PATCH 7/8] Add deflate_decompress function Sascha Hauer
2013-08-06 13:07 ` [PATCH 8/8] fs: Add ubifs support Sascha Hauer
2013-08-06 18:16   ` Alexander Aring
2013-08-06 19:50     ` Sascha Hauer
2013-08-06 23:50       ` Alexander Aring

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1375794428-29577-7-git-send-email-s.hauer@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox