Re: [lwip-users] mutex API in system layer is necessary ?

2012-05-10 Thread Simon Goldschmidt
Mason wrote: > AFAIU, mutexes do not make a system immune to priority inversion. > > Consider 3 processes of increasing priority L, M, H. > > Suppose L locks a mutex; then H waits for the mutex; then M starts > running and preempts L : H will never run, as long as M runs. That's exactly the ca

Re: [lwip-users] mutex API in system layer is necessary ?

2012-05-10 Thread Mason
Simon Goldschmidt wrote: > "Define LWIP_COMPAT_MUTEX if the port has no mutexes and binary > semaphores should be used instead". The only disadvantage of using > binary semaphores (in this case, the sys_mutex_* functions are > defined to their sys_sem_* substitute) is that you can get priority > i

Re: [lwip-users] mutex API in system layer is necessary ?

2012-05-08 Thread vincent cui
users Subject: Re: [lwip-users] mutex API in system layer is necessary ? vincent cui wrote: > Yes, they are same ... > I am confused that nobody meet this kind of problem Still, please just don't re-post (and do keep the summary in sync with a post's content). You risk annoying peopl

Re: [lwip-users] mutex API in system layer is necessary ?

2012-05-08 Thread FreeRTOS Info
On 08/05/2012 06:20, Simon Goldschmidt wrote: > vincent cui wrote: >> I had port latest lwip1.4.0 to my system, it works well . but I found some >> additional api about mutex are defined in 1.4.0 >> >> I want to know that are they necessary ? > > No, as it says in sys.h: "Define LWIP_COMPAT_MUT

Re: [lwip-users] mutex API in system layer is necessary ?

2012-05-08 Thread Simon Goldschmidt
vincent cui wrote: > Yes, they are same ... > I am confused that nobody meet this kind of problem Still, please just don't re-post (and do keep the summary in sync with a post's content). You risk annoying people with this behaviour and as a result you will get even less responses. Simon --

Re: [lwip-users] mutex API in system layer is necessary ?

2012-05-07 Thread vincent cui
Subject: Re: [lwip-users] mutex API in system layer is necessary ? vincent cui wrote: > I use the following code to receive file from client tool, the receive > speed will be up to down after send 3 times . > Is it LWIP bug ? How in the world is this question related to the summary of

Re: [lwip-users] mutex API in system layer is necessary ?

2012-05-07 Thread Simon Goldschmidt
vincent cui wrote: > I use the following code to receive file from client tool, the receive > speed will be up to down after send 3 times . > Is it LWIP bug ? How in the world is this question related to the summary of your post??? Isn't that the same question you asked in your other post ("rece

Re: [lwip-users] mutex API in system layer is necessary ?

2012-05-07 Thread vincent cui
5月8日 13:21 To: Mailing list for lwIP users Subject: Re: [lwip-users] mutex API in system layer is necessary ? vincent cui wrote: > I had port latest lwip1.4.0 to my system, it works well . but I found some > additional api about mutex are defined in 1.4.0 > > I want to know that are t

Re: [lwip-users] mutex API in system layer is necessary ?

2012-05-07 Thread Simon Goldschmidt
vincent cui wrote: > I had port latest lwip1.4.0 to my system, it works well . but I found some > additional api about mutex are defined in 1.4.0 > > I want to know that are they necessary ? No, as it says in sys.h: "Define LWIP_COMPAT_MUTEX if the port has no mutexes and binary semaphores shou

[lwip-users] mutex API in system layer is necessary ?

2012-05-07 Thread vincent cui
All: I had port latest lwip1.4.0 to my system, it works well . but I found some additional api about mutex are defined in 1.4.0 I want to know that are they necessary ? err_t sys_mutex_new(sys_mutex_t *mutex) { return ERR_OK; } void sys_mutex_lock(sys_mutex_t *mutex) { } void sys_m