[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-devel] [bug #27377] "op_completed" semaphore mechanism crash error
From: |
hanhui |
Subject: |
[lwip-devel] [bug #27377] "op_completed" semaphore mechanism crash error |
Date: |
Fri, 04 Sep 2009 07:08:35 +0000 |
User-agent: |
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; InfoPath.1; .NET CLR 2.0.50727) |
Follow-up Comment #1, bug #27377 (project lwip):
another BUG found: user thread and tcpip thread synchronization mechanism.
for example: here are 3 thread: recv_thread() send_thread() tcpip_thread().
recv_thread() has the highest priority. tcpip_thread() has the middle
priority, send_thread() has the lowest priority of all.
one time, send_thread call tcpip_apimsg() to add a do_send() job to
tcpip_thread, after mbox post, tcpip_thread run immediately. now send_thread
do not wait for op_completed semaphore. at this time send_thread does not wait
for op_completed semaphore, then tcpip_thread execute do_send() job... at this
time recv_thread() wake up, preempt all other thread, and is call
tcpip_apimsg() to add a do_recv() job to tcpip_thread, mbox post do not cause
a preempt, and then recv_thread wait for op_completed semaphore. then
tcpip_thread resume execute do_send()... when do_send() finish, it will signal
op_completed semaphore. NOW! not send_thread get is signal, but recv_thread.
_______________________________________________________
Reply to this item at:
<http://savannah.nongnu.org/bugs/?27377>
_______________________________________________
Message sent via/by Savannah
http://savannah.nongnu.org/