lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-users] Re: [lwip] Run time errors on applicatioin


From: Kieran Mansley
Subject: [lwip-users] Re: [lwip] Run time errors on applicatioin
Date: Wed, 08 Jan 2003 23:20:19 -0000

On Thu, 3 Oct 2002, ERIC MAHLAKO wrote:

> Hello
>
> I,m running Lwip-0.5.3 on Linux 2.4.18. I have
> modified Netperf testbench to use lwip, but when I try
> to run the application I got the following error:
>
> sys:current_thread:could not find the current thread.
> This is due to a race condition in the LinuxThreads
> pthreads implementation. Start the program again.
>
> Can anyone help me to solve this problem

That's odd.  The thread_start function that was added a couple of
revisions ago into sys_arch should have fixed that.

The race is that lwip stores a list of the threads and their pthread
reference.  When it starts a thread, it has to get the reference for that
thread into the list before the new thread calls "current_thread".
(current_thread uses the list, and is the function causing your error).
thread_start fixes this by being the starting point for all threads, and
inserts the pthread reference into the list before calling the proper
routine for that thread, thereby ensuring the list is complete before the
new thread starts.

Has anyone else seen this with 0.5.3?  If so, I'll take another look.

Thanks

Kieran

[This message was sent through the lwip discussion list.]




reply via email to

[Prev in Thread] Current Thread [Next in Thread]