This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: docs on using free bsd API port ?


On Fri, 2003-07-18 at 08:50, Philippe Moutarlier wrote:
> I am having some questions about the right way to interface with the
> stack at the interface level. For example, is it safe to use the
> if_attach function without data protection mechanism ? I found splnet 
> call in if_detach but not in if_attach.
> 

This is probably because if_attach is traditionally called before
interrupts are enabled.  If you know this to not be the case, then
it would be prudent for you to add the spl() protection around
calls to it.

> I am also a little confused about the re-definition of malloc in kernel
> mode. Can we still use the "classic" method when interfacing with the
> stack (i.e. can I do "normal" malloc to create an ifnet before calling
> if_attach ?).

Stick with the special allocator that comes with the stack.  The 
standard eCos allocator is not suitable for use here.

> 
> More generally, is there documentation I could refer to at that level ?
> The code itself doesn't seem to have too much of it..

Alas, there's precious little documentation here, just the code.

-- 
Gary D. Thomas <gary.thomas@mind.be>


-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]