lwip-users
[Top][All Lists]
Advanced

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

[lwip-users] Problems under LInux 2.4 (with unixsim)


From: Przemek Wirkus
Subject: [lwip-users] Problems under LInux 2.4 (with unixsim)
Date: 09 Aug 2005 19:58:15 +0200

Hi,

I'm trying to run lwIP (lwip-0.5.3.tar.gz from project site) app under
linux (Red Hat 9.0, kernel 2.4.20-8).

I've successfully build /proj/unixsim with just a 'make' command :)
Everything is quite ok, I think. I can run simhost, simrouter and
simnode. - checked with ping, tcpdump etc.

I've compiled and linked my own project BUT! when I run program from
command line (as root of course) I have this warning and program aborts:

address@hidden src]# ./a.out
sys: current_thread: could not find current thread!
This is due to a race condition in the LinuxThreads
pthreads implementation. Start the program again.
Aborted

I know this text is from current_thread() function warning (via printf,
and then abort() function.

But I don't know why this happened and is there any way to avoid this
problem?. It's very disturbing :E

My gcc: gcc version 3.2.2 20030222 (Red Hat Linux 3.2.2-5)
My linux: Linux 2.4.20-8 #1 Thu Mar 13 17:18:24 EST 2003 i686 athlon
i386 GNU/Linux
I don't think that is a TUN/TAP problem 'cause I've this module loaded
(checked via lsmod).

Any idea what's wrong with this thread problem ???

~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ 

To compile and link and build I type: make ; make main

My code:

#include <stdio.h>
#include "lwip/api.h"
int main(int argc, char** argv)
{
    struct netconn *conn, *newconn;
    netconn_new(NETCONN_TCP); /* Only to start lwIP function */
    return 0;
}

~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ 

My Makefile:

CCDEP=gcc
CC=gcc
CFLAGS=-Wall -g
LWARCHDIR=/root/lwip/lwip-0.5.3/src/arch/unix/include
LWIPINC2=/root/lwip/lwip-0.5.3/proj/unixsim
LWIPINC3=/root/lwip/lwip-0.5.3/src/include/ipv4
CFLAGS:=$(CFLAGS) -I$(LWIPDIR) -I$(LWARCHDIR) -I$(LWIPINC2)
-I$(LWIPINC3)

main.o:
        $(CC) $(CFLAGS) -c main.c -o main.o
.PHONY: clean
clean:
        rm -f *.o main a.out
main: main.o
        $(CC) -Wall main.o liblwip4.a -lpthread

--
Przemek Wirkus 
Poland,
The Silesian University of Technology





reply via email to

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