[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [lwip-users] How to securely switch between DHCP and static IP assig
From: |
Simon Goldschmidt |
Subject: |
RE: [lwip-users] How to securely switch between DHCP and static IP assignment? |
Date: |
Fri, 23 Jul 2010 10:11:48 +0200 |
"Benjamin Schelte" wrote:
> Actually I am not calling those functions from the tcpip_thread
> environment.
> So in case I have to, how can I manage to make the thread to do so?
Generally, all functions in lwIP except for the socket API, the netconn API,
the threaded netif-API (netifapi_* functions), the allocations functions
(pbuf_*(), mem_*() and memp_*() functions) must NOT be called from any other
thread than the tcpip_thread. Of course when not using an OS, this must read as
"not be called from interrupt context".
When using tcpip.c, use tcpip_callback to call a function with a given argument
in the tcpip_thread. The function pointer and the argument pointer are enqueued
in the tcpip_thread's mbox and will get called eventually, so care must be
taken about the argument's lifetime.
Simon
--
Neu: GMX De-Mail - Einfach wie E-Mail, sicher wie ein Brief!
Jetzt De-Mail-Adresse reservieren: http://portal.gmx.net/de/go/demail