[Top][All Lists]

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

[lwip-devel] [bug #25608] Unable to use NO_SYS=1 and SYS_LIGHTWEIGHT_PRO

From: Jim Pettinato
Subject: [lwip-devel] [bug #25608] Unable to use NO_SYS=1 and SYS_LIGHTWEIGHT_PROT=1
Date: Wed, 08 Apr 2009 18:30:41 +0000
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: Gecko/2009032609 Firefox/3.0.8

Follow-up Comment #13, bug #25608 (project lwip):

>Kieran, if protection isn't NO_SYS dependent, doesn't it make sense to move
the protection #defines outside of the #if NO_SYS #else #endif group

I believe they already are outside of this group.

>At the top of sys.h, I don't understand why not add #include "sys_arch.h"
for both cases of NO_SYS. The system requirements in sys.h should bring in any
architecture requirements or overrides for both cases. sys_arch.h should take
care of its NO_SYS business. 

I think the point of the lightweight protection scheme was to allow the stack
to support ISR-based drivers without requiring the features of a full-blown OS
(queues, mailboxes, semaphores). I am not sure it makes much sense to
implement a scheme for SYS_LIGHTWEIGHT_PROT with NO_SYS=0, but it isn't
prevented currently that I can see.

In theory anyway, the sys_arch.h header represents only the OS interface
portion of the architecture (there is also cc.h and cpu.h for the other
vagaries of your target). I can understand the reasoning behind not including
sys_arch.h if you have no OS.

Bottom line - there is one issue that could easily be cleaned up...  the
comment in the SYS_ARCH_DECL_PROTECT section of sys.h indicates that the type
of the protection variable can be overridden in sys_arch.h - which is not true
when lightweight protection is most likely to be used (when NO_SYS=1). Maybe
the comment should be changed?


Reply to this item at:


  Message sent via/by Savannah

reply via email to

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