[Top][All Lists]

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

[lwip-devel] [patch #9807] New function tcpip_callback_wait()

From: Joan Lledó
Subject: [lwip-devel] [patch #9807] New function tcpip_callback_wait()
Date: Sun, 19 May 2019 05:29:55 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/60.0


                 Summary: New function tcpip_callback_wait()
                 Project: lwIP - A Lightweight TCP/IP stack
            Submitted by: jllledo
            Submitted on: Sun 19 May 2019 11:29:52 AM CEST
                Category: sockets/netconn
                Priority: 5 - Normal
                  Status: None
                 Privacy: Public
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release: None



This comes from [1].

I wrote a patch which adds a new function to call a callback inside the tcpip
thread ans block the calling thread until the callback finishes. While writing
it I came into some questions:

1.- Do you think it's useful to add support for LWIP_NETCONN_SEM_PER_THREAD?

2.- Should I use TCPIP_MSG_VAR_ALLOC() and friends instead of declaring msg
directly? I understand what these macros do, but I don't know what's the
problem they solve. So i don't know whether this new function should use

3.- Should I allocate msg in dynamic memory instead of declaring it locally?
Since the calling thread is blocked, msg will remain in the scope when the
tcpip thread tries to read it.

4.- If I allocate msg, then should the tcpip thread free it?

[1] http://lists.nongnu.org/archive/html/lwip-devel/2019-05/msg00020.html


File Attachments:

Date: Sun 19 May 2019 11:29:52 AM CEST  Name:
0001-New-function-tcpip_callback_wait.patch  Size: 4KiB   By: jllledo



Reply to this item at:


  Message sent via Savannah

reply via email to

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