[ECOS] Mutex assertion fail when select() timeout
I-Jui Sung
ijsung@csie.nctu.edu.tw
Mon Oct 8 06:19:00 GMT 2001
Hi eCos folks,
According to James Chen's early post, the following code will throw an
assertion on timed-out mutex in
kernel/current/src/sync/mutex.cxx.
=testing code=
#include<stdio.h>
#include<sys/select.h>
#include<sys/time.h>
int main(void)
{
struct timeval tout;
tout.tv_sec=0;
tout.tv_usec=1;
printf("Before select\n");
select(0, NULL, NULL, NULL, &tout);
printf("After select\n");
}
P.S. The attached file is a patch suggested by Chen.
Happy hacking,
I-Jui Sung
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mutex.cxx.patch
Type: text/x-diff
Size: 615 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/ecos-discuss/attachments/20011008/6175c273/attachment.bin>
More information about the Ecos-discuss
mailing list