Hey all,
a short question about sys_arch_sem_wait(). When someone is waiting for
it, and it gets an eror/deleted.
Is that a serious condition that shouldn't hapen or should it just return
the usual SYS_ARCH_TIMEOUT?
At the moment we have an Assertion in there (in a define called
"IF_DEBUG_HALT") and it sometimes fires in strange situations.
u32_t sys_arch_sem_wait(sys_sem_t sem, u32_t timeout){
long lStart = (long)OsGetTime();
unsigned char bResult;
if(!timeout){
bResult = OsSemEnter((unsigned long)sem);
if(!bResult){//invalid or deleted while waiting on
IF_DEBUG_HALT;
}
} else {
bResult = OsSemWait((unsigned long)sem, timeout);
}
if(bResult){
return((u32_t)(((long)OsGetTime()) - lStart));
} else {
return(SYS_ARCH_TIMEOUT);
}
}
regards,
Fabian
_______________________________________________
lwip-users mailing list
lwip-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/lwip-users