lwip-members
[Top][All Lists]
Advanced

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

Re: [lwip-members] question about SYS_ARCH_ defines


From: David Haas
Subject: Re: [lwip-members] question about SYS_ARCH_ defines
Date: Tue, 18 Feb 2003 09:33:40 -0500
User-agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.2b) Gecko/20021107

Hi,

I'll be happy to do this. I also got another patch from Marc Boucher which I need to look at. Actually I had asked him to submit his patches to the web page, but he seems to like to send them to me.

But, I have a question about SYS_LIGHTWEIGHT_PROT. I originally added this because I did not want to change what people were using already. I would propose removing it however. I think the protection I added is needed in pbuf and memp if you have an OS. Since macros are used, if you don't want protection there, then you just define the macros to nothing. One other thing that this would change is that I would remove the locks in pbuf and they would be replaced by the protection macros. I personally beleive that we cannot allow buffer allocation to fail because of a protection issue (which is what those locks did). That could mean non-random dropped frames. In other words because of task synchronization (synchronicity?) you might actually get failures at the same point each time.

Comments?

Regards,
David.


address@hidden wrote:

Hello,

Can someone explain the defines used in sys_arch.h? Preferably,
somewhere in the source. Thanks!

/** explain this define here */
#ifndef SYS_ARCH_PROTECT
/** explain this define here */
#ifdef SYS_LIGHTWEIGHT_PROT


/** explain this define here */
#define SYS_ARCH_DECL_PROTECT(lev) sys_prot_t lev
/** explain this define here */
#define SYS_ARCH_PROTECT(lev) lev = sys_arch_protect()
/** explain this define here */
#define SYS_ARCH_UNPROTECT(lev) sys_arch_unprotect(lev)

sys_prot_t sys_arch_protect(void);
void sys_arch_unprotect(sys_prot_t pval);
#else /* SYS_LIGHTWEIGHT_PROT */

#define SYS_ARCH_DECL_PROTECT(lev)
#define SYS_ARCH_PROTECT(lev)
#define SYS_ARCH_UNPROTECT(lev)
#endif /* SYS_LIGHTWEIGHT_PROT */

#endif /* SYS_ARCH_PROTECT */

Leon



_______________________________________________
lwip-members mailing list
address@hidden
http://mail.nongnu.org/mailman/listinfo/lwip-members








reply via email to

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