[patch #9807] New function tcpip_callback_wait()

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[patch #9807] New function tcpip_callback_wait()

Wilfred
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/


_______________________________________________
lwip-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-devel
Reply | Threaded
Open this post in threaded view
|

[patch #9807] New function tcpip_callback_wait()

Wilfred
Update of patch #9807 (project lwip):

                  Status:                    None => Done                  
             Assigned to:                    None => goldsimon              
             Open/Closed:                    Open => Closed                

    _______________________________________________________

Follow-up Comment #1:

Pushed, thanks for the patch.

    _______________________________________________________

Reply to this item at:

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

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


_______________________________________________
lwip-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-devel