>>> Jonathan Larmour <[EMAIL PROTECTED]> schrieb am 31.05.2007 um 11:20: > Matthias Weisser wrote: >> Hi >> >> After playing around with my echo server I saw a strange behavior of my >> sys_sem_signal() implementation. I have implemented the semaphores as >> binary mutexes. Now I see that one of the semaphores is created with a >> initial count of 0 then signaled and then signaled again. Can this be >> ignored as I expect or indicates it another bug in my port? > > Semaphores and mutexes are not identical. Especially, as in this case, when > the semaphores are counting semaphores, not binary. But you can abstract it > using mutexes and condition variables, and a variable to represent the > semaphore count.
So, this means that lwip needs counting semaphores? If so than I can use the semaphores of my OS (which are counting semaphores) but than I have still the problem of a lot of sys_sem_signal calls to a semaphore where is never called a wait for. So the semaphores value is incremented and incremented and incremented until it reaches a maximum value (which I can define in my OS) and then the OS reports the error. I can set the maximum to a very high value but that doesn't solve the problem. Another question is: What does the count argument of sys_sem_new mean? Is it the initial count value of the semaphore? Or anything else? Matthias _______________________________________________ lwip-users mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/lwip-users
