On 10/10/05, Bertrik Sikken <address@hidden> wrote:
>I'm no lwIP expert but here are my thoughts:
Thanks for your reply..even I am new to lwip
>* 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.
I saw the example in the /unix/proj/unixsim/simhost.c example and exactly written my application.Can you please provide me with a piece of code , how can I make a blocking call to main_thread..and where should I add it in my code .??
>* It seems to me that you are trying to do a lot of complicated things all
>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.
Yes you are right , I included all the command line interface of the tftp client in my main_changed.c , I will make it simple first , please provide me with the code for blocking call to main_thread , as you already had a look on my code ..I guess .. that would be helpful to me
>* Aren't you missing a netif_set_up call somewhere?
>I would expect this just after the netif_add call.
Yes you are right ... I added the netif_set_up function after the netif_add call ..Thanks for your correction
||+31(0)182 59 40 00 |
||+31(0)182 53 97 36|
|Visit us at:
||P.O. Box 2013 - 2800 BD Gouda - The Netherlands|
||Zuidelijk Halfrond 1 - 2801 DD Gouda - The Netherlands|
||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.
] On Behalf Of Durgaprasad Chivukula
Sent: maandag 10 oktober 2005 11:34
To: Mailing list for lwIP users
Subject: [lwip-users] [lwip users] using threads in our application safely???
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!!!!!
lwip-users mailing list