lwip-devel
[Top][All Lists]
Advanced

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

[lwip-devel] [patch #5453] pbuf patch for SYS_LIGHTWEIGHT_PROT=0


From: Simon Goldschmidt
Subject: [lwip-devel] [patch #5453] pbuf patch for SYS_LIGHTWEIGHT_PROT=0
Date: Sun, 29 Apr 2007 10:53:51 +0000
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3

Follow-up Comment #19, patch #5453 (project lwip):

I just realized my last patch was missing SYS_ARCH_(UN)PROTECT() around
"p->next = pbuf_pool; pbuf_pool = p;" as the protection in pbuf_free() has
changed in the last 2 months, my original patch was a little older. I'm
attaching the new patch (which has only 2 lines more).


Just another point where SYS_LIGHTWEIGHT_PROT seems to be interpreted
differently: in memp.c, there's the following:

#if !SYS_LIGHTWEIGHT_PROT
static sys_sem_t mutex;
#endif

which means a mutex is used to protect the pools if SYS_LIGHTWEIGHT_PROT=0,
which is the opposite of the behaviour in pbuf.c.

In my opinion, the mutex should be removed, resulting in no protection with
SYS_LIGHTWEIGHT_PROT=0 and normal/fast protection with
SYS_LIGHTWEIGHT_PROT=1. (Also, memp_malloc() could be tuned to shorten the
time interrupts are disabled, but that's another issue.)

(file #12620)
    _______________________________________________________

Additional Item Attachment:

File name: pbuf_lightweightprot2.patch    Size:4 KB


    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/patch/?5453>

_______________________________________________
  Nachricht geschickt von/durch Savannah
  http://savannah.nongnu.org/





reply via email to

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