[PATCH 2/3] lockmeter: lockmeter fix for generic_read_trylock

From: Ray Bryant
Date: Thu Sep 16 2004 - 18:49:36 EST


Update lockmeter.c with generic_raw_read_trylock fix.

Signed-off-by: Ray Bryant <raybry@xxxxxxx>

Index: linux-2.6.9-rc2-mm1/kernel/lockmeter.c
===================================================================
--- linux-2.6.9-rc2-mm1.orig/kernel/lockmeter.c 2004-09-16 12:03:20.000000000 -0700
+++ linux-2.6.9-rc2-mm1/kernel/lockmeter.c 2004-09-16 12:29:08.000000000 -0700
@@ -1213,6 +1213,18 @@
* except for the fact tht calls to _raw_ routines are replaced by
* corresponding calls to the _metered_ routines
*/
+
+/*
+ * Generic declaration of the raw read_trylock() function,
+ * architectures are supposed to optimize this:
+ */
+int __lockfunc generic_raw_read_trylock(rwlock_t *lock)
+{
+ _metered_read_lock(lock, __builtin_return_address(0));
+ return 1;
+}
+EXPORT_SYMBOL(generic_raw_read_trylock);
+
int __lockfunc _spin_trylock(spinlock_t *lock)
{
preempt_disable();

--
Best Regards,
Ray
-----------------------------------------------
Ray Bryant raybry@xxxxxxx
The box said: "Requires Windows 98 or better",
so I installed Linux.
-----------------------------------------------
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/