lwip-devel
[Top][All Lists]
Advanced

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

[lwip-devel] [bug #21433] Calling mem_free/pbuf_free from interrupt cont


From: EVS Hardware Dpt
Subject: [lwip-devel] [bug #21433] Calling mem_free/pbuf_free from interrupt context isn't safe
Date: Tue, 30 Oct 2007 09:03:42 +0000
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.8) Gecko/20071008 Firefox/2.0.0.8

Follow-up Comment #7, bug #21433 (project lwip):

Hello,

    >SYS_ARCH_LOCK_RESOURCE

    It's a idea which can be merged with "task #7212 : Add Mutex concept in
    sys_arch"



Yes and No, a mutex should block until it's free again. We do not have an OS,
and so no primitive to block on something. You may think "OK, no OS, no
thread, no need to block", but it's the very problem we have. How to lock
access to a resource without the need to disable Interrupts and without OS
primitives to wait until resource is free.

The proposed architecture could solve the problem although limited to mem.c
module. You don't execute some parts of code because they are locked (in our
example, we are currently at ISR level trying to free memory allocated by a
PBUF, ISR interrupted the program while allocating some memory. All was
protected by semaphores, but implemented as nothing because NO_SYS=1) but
remember they weren't executed. Then, when possible execute them.

Fred.

    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/bugs/?21433>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/





reply via email to

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