lwip-devel
[Top][All Lists]
Advanced

[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

URL:
  <https://savannah.nongnu.org/patch/?9807>

                 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

    _______________________________________________________

Details:

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

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

<http://savannah.nongnu.org/patch/download.php?file_id=46926>

    _______________________________________________________

Reply to this item at:

  <https://savannah.nongnu.org/patch/?9807>

_______________________________________________
  Message sent via Savannah
  https://savannah.nongnu.org/




reply via email to

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