lkml.org 
[lkml]   [2002]   [Oct]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: in_atomic() & spin_lock / spin_unlock in different functions
> What is it that in_atomic counts? Obviously spinlocks and
> get_cpu/put_cpu. Anything else?
>

preempt_disable(), local_irq_disable(), local_bh_disable().

> I'm doing spin_lock_irqsave() then in another function
> spin_unlock_irqrestore. Is that okay? If no, can it cause "scheduling
> in atomic"?

It's not okay, but shouldn't cause scheduling in atomic messages.

The problem is sparc: the 'unsigned long flags' parameter used by
_irqsave and _irqrestore contains the stack frame, which means that you
cannot pass it between functions.

--
Manfred

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:30    [W:0.034 / U:0.456 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site