lwip-devel
[Top][All Lists]
Advanced

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

[lwip-devel] [bug #52856] Make Socket API usable without thread support.


From: Matthias Hofmann
Subject: [lwip-devel] [bug #52856] Make Socket API usable without thread support.
Date: Wed, 10 Jan 2018 06:00:21 -0500 (EST)
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:56.0) Gecko/20100101 Firefox/56.0

URL:
  <http://savannah.nongnu.org/bugs/?52856>

                 Summary: Make Socket API usable without thread support.
                 Project: lwIP - A Lightweight TCP/IP stack
            Submitted by: mhofmann
            Submitted on: Wed 10 Jan 2018 11:00:19 AM UTC
                Category: sockets/netconn
                Severity: 3 - Normal
              Item Group: Feature Request
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release: None
            lwIP version: 2.0.3

    _______________________________________________________

Details:

We are using lwIP in our real time OS with static tasks and hard deadlines.
Initial we used lwIP with NO_SYS=1, but the effort to use 3rd party libs on
top of the callback API of lwIP was quite high.

So we decided to use the Socket API provided by lwIP. This means implementing
the mailbox system, mutex and semaphores (NO_SYS=0). But still the Socket API
can not be used in a real time environment.
For adding this support only some modifications in lwIP are needed. The main
problem is the tcpip_thread() function, that never return and it mainly boils
down to make it cyclic callable.

In our solution the sys_thread_new() function in sys_arch.c is a NOP and
tcpip_thread() and sys_check_timeouts() are called cyclic.

In the end we have a working solution, that allow us to use the non blocking
part of the socket API.

The attached example contains all modification we did inside of lwIP. It is no
clean solution. I attached it. So you can get an impression, which
modifications are needed.

The question is: If there is any interest in making the Socket API available
for real time systems and environments without support for concurrent
threads?

Cheers Matthias



    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Wed 10 Jan 2018 11:00:19 AM UTC  Name:
example_0001-Make-tcpip_thread-cyclic-callable.patch  Size: 4KiB   By:
mhofmann

<http://savannah.nongnu.org/bugs/download.php?file_id=42882>

    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/bugs/?52856>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/




reply via email to

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