Re: System crash in tcp_fragment()

2 messages, 2 authors, 2002-05-21 · open the first message on its own page

Re: System crash in tcp_fragment()

From: <hidden>
Date: 2002-05-21 12:47:40

Hello!
I understand the issue.
I do not.


+#define preempt_disable() \
+do { \
+       ++current->preempt_count; \
+       barrier(); \
+} while (0)

Why does this work?

Alexey

Re: System crash in tcp_fragment()

From: george anzinger <hidden>
Date: 2002-05-21 15:42:51

kuznet@ms2.inr.ac.ru wrote:
Hello!
quoted
I understand the issue.
I do not.

+#define preempt_disable() \
+do { \
+       ++current->preempt_count; \
+       barrier(); \
+} while (0)

Why does this work?

Alexey
Preemption can only happen if the task is interrupted.  The
interrupt exit code will not preempt if preempt_count is
more than zero.  The barrier() forces the result to memory
so the interrupt code can find it.
-- 
George Anzinger   george@mvista.com
High-res-timers: 
http://sourceforge.net/projects/high-res-timers/
Real time sched:  http://sourceforge.net/projects/rtsched/
Preemption patch:
http://www.kernel.org/pub/linux/kernel/people/rml
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help