[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [lwip-users] [lwip users] using threads in our application safely???
From: |
Bertrik Sikken |
Subject: |
RE: [lwip-users] [lwip users] using threads in our application safely??? |
Date: |
Mon, 10 Oct 2005 17:34:29 +0200 |
I'm no lwIP expert but here are my
thoughts:
* Why are you starting main_thread as a separate
thread?
As far as I can see, there is no need to do so and you
can just make a blocking call to main_thread instead.
* It seems to me that you are trying to do a lot of
complicated things all at once.
Try to keep things as simple as possible, so start with
something simple that works,
then add some more functionality and check if
it still works, etc.
* Aren't you missing a netif_set_up call
somewhere?
I would expect this just after the netif_add
call.
Kind regards,
Bertrik Sikken |
System Designer
|
Technolution B.V. |
|
Telephone: |
+31(0)182 59 40 00 |
Fax: |
+31(0)182 53 97 36 |
E-mail: |
address@hidden |
Visit us at: |
www.technolution.nl |
Mailing address: |
P.O. Box 2013 - 2800 BD Gouda - The Netherlands |
Address: |
Zuidelijk Halfrond 1 - 2801 DD Gouda - The Netherlands |
GPS: |
N 52°.00'58,2" E 4°.41'05,2" |
This e-mail is intended exclusively for the addressee(s), and may not
be passed on to, or made available for use by any person other than the
addressee(s). Technolution B.V. rules out any and every liability
resulting from any electronic
transmission. |
Hi Friends ,
I already posted lot of
questions to this group regarding my tftp client implementation of lwip , but I
did not get any replies .I also posted my source code implementation , but the
same. I hope you can guide me with my probelm this time . As I said I am writing
a tftp client application on lwip using the socket API ,tapif interface (using
bridge configuration ) on Redhat linux 2.4.20-8 . I need to put and
get files from/ to a remote server. But both put and get are not
working.While getting I am only getting first 512 bytes and then
tapif_input function halts I am creating only 1 thread in my application
and I guess this is making problems , How can I use thread mechanism safely in
my application ??? I am herewith attaching my implementation to this email ,
please have a look and suggest me in this ...Help!!!!!!!
Also one more thing is I profile my whole stack using gprof
/Functioncheck (profiling tools on linux ) as a part of my work , these
tools are giving erroneous(wrong) results for example
sys_arch_sem_wait is called 744 times , sys_sem_signal is called 699 times
...and so on.... do u guys really think that these functions are called this
many number of times.... I run my application and then run the tool , so it is a
dynamic execution profiler.....I guess there is a problem with my thread
implementation....
Please find below attached source code of my tftp client....in a zip file
... the important parts of the code to look at are
1. main_changed.c (main function , main_thread function ,
setpeer , get ,put
2. tftp_changed.c (tftp_sendfile , tftp_recvfile)
3.tftpsubs_changed.c (which implements the buffer mechanism )
Please help me!!!!!
Regards
Durga