From 28b7f6fb58ca84cfdd0bd2a85caa64b1c7247e8c Mon Sep 17 00:00:00 2001 From: fche Date: Tue, 29 May 2007 22:07:59 +0000 Subject: 2007-05-29 Frank Ch. Eigler PR 4458 * print_new.c (_stp_print_flush): Use interrupt-disabling spinlock variants. --- runtime/print_new.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'runtime/print_new.c') diff --git a/runtime/print_new.c b/runtime/print_new.c index a1f1274d..b34aad8a 100644 --- a/runtime/print_new.c +++ b/runtime/print_new.c @@ -52,13 +52,14 @@ void _stp_print_flush (void) #else { void *buf; - spin_lock(&_stp_print_lock); + unsigned long flags; + spin_lock_irqsave(&_stp_print_lock, flags); buf = relay_reserve(_stp_utt->rchan, len); if (likely(buf)) memcpy(buf, pb->buf, len); else atomic_inc (&_stp_transport_failures); - spin_unlock(&_stp_print_lock); + spin_unlock_irqrestore(&_stp_print_lock, flags); } #endif /* STP_BULKMODE */ } -- cgit