diff options
author | Andrew Morton <akpm@osdl.org> | 2004-04-11 22:41:20 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-04-11 22:41:20 -0700 |
commit | b283f09cf8f51c29bf90e42e22099f76d0f33378 (patch) | |
tree | 7aee46f073ec3c8fc678b64eb430e2958ff0de1e /lib | |
parent | ee28db843649533f5650186251ae4a8bd49a3da9 (diff) | |
download | history-b283f09cf8f51c29bf90e42e22099f76d0f33378.tar.gz |
[PATCH] Fix get_wchan() FIXME wrt. order of functions
From: William Lee Irwin III <wli@holomorphy.com>
This addresses the issue with get_wchan() that the various functions acting
as scheduling-related primitives are not, in fact, contiguous in the text
segment. It creates an ELF section for scheduling primitives to be placed
in, and places currently-detected (i.e. skipped during stack decoding)
scheduling primitives and others like io_schedule() and down(), which are
currently missed by get_wchan() code, into this section also.
The net effects are more reliability of get_wchan()'s results and the new
ability, made use of by this code, to arbitrarily place scheduling
primitives in the source code without disturbing get_wchan()'s accuracy.
Suggestions by Arnd Bergmann and Matthew Wilcox regarding reducing the
invasiveness of the patch were incorporated during prior rounds of review.
I've at least tried to sweep all arches in this patch.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/rwsem.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/rwsem.c b/lib/rwsem.c index 95469d7fb7960d..85dcae7e933736 100644 --- a/lib/rwsem.c +++ b/lib/rwsem.c @@ -5,6 +5,7 @@ */ #include <linux/rwsem.h> #include <linux/sched.h> +#include <linux/init.h> #include <linux/module.h> struct rwsem_waiter { @@ -162,7 +163,7 @@ static inline struct rw_semaphore *rwsem_down_failed_common(struct rw_semaphore /* * wait for the read lock to be granted */ -struct rw_semaphore fastcall *rwsem_down_read_failed(struct rw_semaphore *sem) +struct rw_semaphore fastcall __sched *rwsem_down_read_failed(struct rw_semaphore *sem) { struct rwsem_waiter waiter; @@ -178,7 +179,7 @@ struct rw_semaphore fastcall *rwsem_down_read_failed(struct rw_semaphore *sem) /* * wait for the write lock to be granted */ -struct rw_semaphore fastcall *rwsem_down_write_failed(struct rw_semaphore *sem) +struct rw_semaphore fastcall __sched *rwsem_down_write_failed(struct rw_semaphore *sem) { struct rwsem_waiter waiter; |