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

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


Zwane Mwaikambo wrote:
On Thu, 16 Sep 2004, Ray Bryant wrote:


Update lockmeter.c with generic_raw_read_trylock fix.

+ * 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;
+}


What's really going on here? I'm slightly confused by the _metered_read_lock usage.

Thanks,
Zwane



Yeah, I think overly patterned matched on this one. I just
grabbed the code from spinlock.c and do what I normally do to
make it lockmetered, but in this case since its a _raw_ routine, I
should have left it alone. It just needs to be duplicated in
lockmeter.c, not lockmeter'd.

So that middle line there should be:

_raw_read_lock(lock);

instead. I'll get this straightend out with Andrew shortly.
--
Best Regards,
Ray
-----------------------------------------------
Ray Bryant
512-453-9679 (work) 512-507-7807 (cell)
raybry@xxxxxxx raybry@xxxxxxxxxxxxx
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/