[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-members] lightweight protection
From: |
Jani Monoses |
Subject: |
[lwip-members] lightweight protection |
Date: |
Fri, 28 Feb 2003 14:08:44 +0200 |
Hi
in pbuf.c SYS_ARCH_PROTECT & co are called unconditionnally while in memp.c
they are called only if SYS_LIGHTWEIGHT_PROT is 1.Any reason for this
inconsistency?
In pbuf they seem to be an addition to semaphore locking while in memp an
alternative.
Another question: I only see the unix arch defining these at the moment so I'm
not sure
how they were intended to be used.Specifically is sys_arch_decl_protect
supposed to
declare a lock variable?In that case from the use of macros in pbuf that
variable seems
to be local and thus does not protect from accesses from another function to
the protected data.
Or if the lock is supposed to be global than maybe a DECL or two at the
beginning of the file
and various protect/unprotect macro pairs in the functions would be a better
layout.
Jani.
- [lwip-members] lightweight protection,
Jani Monoses <=