This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
assert: "no sleep slots"
- From: Christoph Csebits <christoph dot csebits at frequentis dot com>
- To: ecos discuss list <ecos-discuss at sources dot redhat dot com>
- Date: Thu, 22 Jul 2004 13:35:44 +0200
- Subject: [ECOS] assert: "no sleep slots"
hi,
in net/bsd_tcpip/current/src/ecos/synch.c
there are the following code lines:
CYG_ASSERT( i < CYGPKG_NET_NUM_WAKEUP_EVENTS, "no sleep slots" );
// Defensive:
if ( i >= CYGPKG_NET_NUM_WAKEUP_EVENTS ) {
cyg_scheduler_unlock();
return ETIMEDOUT;
}
The things on this:
1) The if clause is redundant, because the assert will stop execution anyway.
2) I didn't try to figure out how this works, so my question:
Is the assert there because, this must not happen (because of a
bug/failure) or is it just here to say "no resources, please adjust
your CDL parameters"?
So, would it be possible to remove the assert and let the if clause
return ETIMEDOUT instead?
regards, Christoph
--
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss