diff options
author | kaf24@freefall.cl.cam.ac.uk <kaf24@freefall.cl.cam.ac.uk> | 2004-11-01 14:33:53 +0000 |
---|---|---|
committer | kaf24@freefall.cl.cam.ac.uk <kaf24@freefall.cl.cam.ac.uk> | 2004-11-01 14:33:53 +0000 |
commit | b73cc6b15c701015848ed3556d20066a315f3e38 (patch) | |
tree | 4a9a20aa3b10dfded84ac1ae3cf1bf56985e1019 /xen/common/softirq.c | |
parent | 1b354ce174983eab7c4885325b7e04c45edcd0c3 (diff) | |
download | xen-b73cc6b15c701015848ed3556d20066a315f3e38.tar.gz xen-b73cc6b15c701015848ed3556d20066a315f3e38.tar.bz2 xen-b73cc6b15c701015848ed3556d20066a315f3e38.zip |
bitkeeper revision 1.1159.1.320 (4186495166A8XLekEbNixl7hWUA08w)
Clean up softirq handling. All debug keypresses are now deferred to
a softirq handler.
Diffstat (limited to 'xen/common/softirq.c')
-rw-r--r-- | xen/common/softirq.c | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/xen/common/softirq.c b/xen/common/softirq.c index 3e1472e94a..166a8163c1 100644 --- a/xen/common/softirq.c +++ b/xen/common/softirq.c @@ -21,19 +21,13 @@ static softirq_handler softirq_handlers[NR_SOFTIRQS] __cacheline_aligned; asmlinkage void do_softirq() { - unsigned int pending, cpu = smp_processor_id(); - softirq_handler *h; + unsigned int i, pending, cpu = smp_processor_id(); - while ( (pending = xchg(&softirq_pending(cpu), 0)) != 0 ) + while ( (pending = softirq_pending(cpu)) != 0 ) { - h = softirq_handlers; - while ( pending ) - { - if ( pending & 1 ) - (*h)(); - h++; - pending >>= 1; - } + i = find_first_set_bit(pending); + clear_bit(i, &softirq_pending(cpu)); + (*softirq_handlers[i])(); } } |