[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lwip-devel] Name space collisions from api_msg.c
From: |
Simon Goldschmidt |
Subject: |
Re: [lwip-devel] Name space collisions from api_msg.c |
Date: |
Mon, 19 Mar 2012 16:17:34 +0100 |
Mason <address@hidden> wrote:
> api_msg.h exports several functions with very common names,
> leading to name space collisions with user code or other
> library code:
>
> void do_newconn ( struct api_msg_msg *msg);
> [..]
> By the way, why do these functions all have external linkage?
> (instead of static linkage)
>
> I see two options:
>
> 1) make all these functions static
That doesn't work with the current code as the 'do_*()' functions are defined
in api_msg.c while being referenced from api_lib.c.
> 2) prefix each function with "lwip_"
Something like that would work.
I still like the idea of making them static better (although that would mean
having to restructure the code files): while the current separation is chosen
to separate threading contexts, integrating the 2 files into one and making the
'do_*()' functions static would produce smaller (and more efficient) code when
using LWIP_TCPIP_CORE_LOCKING.
Simon
--
NEU: FreePhone 3-fach-Flat mit kostenlosem Smartphone!
Jetzt informieren: http://mobile.1und1.de/?ac=OM.PW.PW003K20328T7073a