lwip-devel
[Top][All Lists]
Advanced

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

RE: [lwip-devel] Initializing static/global variables


From: Goldschmidt Simon
Subject: RE: [lwip-devel] Initializing static/global variables
Date: Tue, 26 Jun 2007 17:51:00 +0200

>> I'd vote for either static _or_ dynamic initialization.
>
> Agreed, I don't think we need anything nearly as sophisticated as
> Robert's suggestion.

But I think we _should_ decide which kind of initialization we use. In sockets.c, the sockets array is not initialized (trusting the linker/startup code will do so) while in udp.c and other files, double initialization is done.

I think a good solution would be to require the target can do static initialization and put some kind of an ifdef around initialization to zero, so that it can be configured in which section such variables are put (initialized by including in the binary or initialized by the startup code).

Simon


reply via email to

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