lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] [lwip users] using threads in our application safely???


From: Durgaprasad Chivukula
Subject: Re: [lwip-users] [lwip users] using threads in our application safely???
Date: Fri, 14 Oct 2005 16:49:22 +0200


  Hi Bertrik ,
 
    Can  you please , give me a small example of the code , which you mentioned in your earlier reply to me regarding making a blocking call to main_thread and where to place it in my code...??
 
Thanks
Durga

 
On 10/10/05, Durgaprasad Chivukula <address@hidden> wrote:


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 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.
 
     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

 
  

 
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.

 


From: lwip-users-bounces+bertrik.sikken=address@hidden [mailto:address@hidden ] On Behalf Of Durgaprasad Chivukula
Sent: maandag 10 oktober 2005 11:34
To: Mailing list for lwIP users
Cc: address@hidden
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!!!!!
 
 
Regards
Durga

_______________________________________________
lwip-users mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/lwip-users




reply via email to

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