From: Prashanth T <prasht@in.ibm.com>
To: rml@tech9.net
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] rwlock_is_locked undefined for UP systems
Date: Fri, 16 Jan 2004 19:15:11 +0530 [thread overview]
Message-ID: <4007EAE7.2030104@in.ibm.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 253 bytes --]
Hi,
I had to use rwlock_is_locked( ) with linux2.6 for kdb and noticed that
this routine to be undefined for UP. I have attached the patch for 2.6.1
below to return 0 for rwlock_is_locked( ) on UP systems.
Please let me know.
Thanks
Prashanth
[-- Attachment #2: rwlock-check-UP.patch --]
[-- Type: text/plain, Size: 585 bytes --]
diff -urN linux-2.6.1/include/linux/spinlock.h linux-2.6.1-rwlock-patch/include/linux/spinlock.h
--- linux-2.6.1/include/linux/spinlock.h 2004-01-09 12:29:33.000000000 +0530
+++ linux-2.6.1-rwlock-patch/include/linux/spinlock.h 2004-01-16 18:15:10.000000000 +0530
@@ -176,6 +176,7 @@
#endif
#define rwlock_init(lock) do { (void)(lock); } while(0)
+#define rwlock_is_locked(lock) ((void)(lock), 0)
#define _raw_read_lock(lock) do { (void)(lock); } while(0)
#define _raw_read_unlock(lock) do { (void)(lock); } while(0)
#define _raw_write_lock(lock) do { (void)(lock); } while(0)
next reply other threads:[~2004-01-16 13:42 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-01-16 13:45 Prashanth T [this message]
2004-01-16 13:55 ` [PATCH] rwlock_is_locked undefined for UP systems Arjan van de Ven
2004-01-16 14:53 ` Joe Thornber
2004-01-16 15:14 ` Nikita Danilov
2004-01-16 18:10 ` Mike Fedyk
2004-01-16 14:09 ` Christoph Hellwig
2004-01-19 6:12 ` Prashanth T
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=4007EAE7.2030104@in.ibm.com \
--to=prasht@in.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rml@tech9.net \
/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