public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] rwlock_is_locked undefined for UP systems
@ 2004-01-16 13:45 Prashanth T
  2004-01-16 13:55 ` Arjan van de Ven
  2004-01-16 14:09 ` Christoph Hellwig
  0 siblings, 2 replies; 7+ messages in thread
From: Prashanth T @ 2004-01-16 13:45 UTC (permalink / raw)
  To: rml; +Cc: linux-kernel

[-- 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)

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2004-01-19  6:10 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-01-16 13:45 [PATCH] rwlock_is_locked undefined for UP systems Prashanth T
2004-01-16 13:55 ` 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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox