fix return value in lwip_select function.
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@39 bbd45198-f89e-11dd-88c7-29a3b14d5316
This commit is contained in:
parent
5931c6d00f
commit
90795b5068
|
@ -966,7 +966,17 @@ lwip_select(int maxfdp1, fd_set *readset, fd_set *writeset, fd_set *exceptset,
|
||||||
msectimeout = 1;
|
msectimeout = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
i = sys_sem_wait_timeout(select_cb.sem, msectimeout);
|
|
||||||
|
if (msectimeout > 0 && sys_arch_timeouts() == NULL){
|
||||||
|
/* it's not a lwip thread, use os semaphore with timeout to handle it */
|
||||||
|
i = sys_arch_sem_wait(select_cb.sem, msectimeout);
|
||||||
|
if (i == SYS_ARCH_TIMEOUT) i = 0;
|
||||||
|
else i = 1;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
/* it's a lwip thread, use os semaphore with timeout to handle it */
|
||||||
|
i = sys_sem_wait_timeout(select_cb.sem, msectimeout);
|
||||||
|
}
|
||||||
|
|
||||||
/* Take us off the list */
|
/* Take us off the list */
|
||||||
sys_sem_wait(selectsem);
|
sys_sem_wait(selectsem);
|
||||||
|
|
Loading…
Reference in New Issue