modify:linux_imp:modify the semaphore wait forever function
@@ -160,16 +160,13 @@ static bool_t __semp_pend(osal_semp_t semp,int timeout)
if(timeout == cn_osal_timeout_forever)
{
///< wait until we get the semaphore
- while(1)
- {
- clock_gettime(CLOCK_REALTIME, &ts);
-
- ts.tv_sec += 10;
- ts.tv_nsec += 0;
- if(0 == sem_timedwait((sem_t *)semp, &ts))
+ if(0 == sem_wait((sem_t *)semp))
{
return true;
}
+ else
+ {
+ return false;
}
}
else if(timeout >= 0)
