lwip-devel
[Top][All Lists]
Advanced

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

[lwip-devel] Re: again... Zero Copy Ethernet interface


From: Jakob Stoklund Olesen
Subject: [lwip-devel] Re: again... Zero Copy Ethernet interface
Date: Sat, 24 Jan 2009 14:11:08 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)

"bill" <address@hidden> writes:
>> dma_done(dma_transfer *tr)
>> {
>>   pbuf_free(tr->pb);
>> }
>> 
> Is dma_done called from a DMA-complete ISR?  If so, is it safe to do?  If
> not, how are you signaling to the main thread/code that the DMA is complete?

It is not called directly from the ISR, that would not be safe since I
am using malloc-backed pbufs.

The DMA ISR sends an asynchronous message that causes dma_done to be
called. This is very similar to the sys_mbox stuff.

I always treat the lwIP code as a giant monitor. There is never more
than one thread of execution entering the stack.

/stoklund





reply via email to

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