[Top][All Lists]

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

[lwip-devel] [patch #5468] sockets.c: Create socksem and selectsem in an

From: goldsimon
Subject: [lwip-devel] [patch #5468] sockets.c: Create socksem and selectsem in an init-function
Date: Fri, 20 Oct 2006 09:59:09 +0000
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv: Gecko/20060909 Firefox/


                 Summary: sockets.c: Create socksem and selectsem in an
                 Project: lwIP - A Lightweight TCP/IP stack
            Submitted by: goldsimon
            Submitted on: Freitag 20.10.2006 um 09:59
                Category: None
                Priority: 5 - Normal
                  Status: None
                 Privacy: Public
             Assigned to: None
        Originator Email: 
             Open/Closed: Open



Created a new function, socket_init() which creates those semaphores. Must be
called any time at startup of the stack, but before using sockets.

See Bug #3466 for description:

All calls to sys_sem_wait() in sockets.c are introduced by

if (!...)
... = sys_sem_new(1);

except for lwip_accept(), where sys_sem_wait() could be used on non-allocated

(Moreover this construction is not thread-save. A task switch could occur
between the decision that the semaphore needs creation and the actual call of

Proposal: Allocate the semaphore only once, at lwip startup.


File Attachments:

Date: Freitag 20.10.2006 um 09:59  Name: socket_init.patch  Size: 2kB   By:



Reply to this item at:


  Nachricht geschickt von/durch Savannah

reply via email to

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