* RE: [ECOS] pc_serial fifo + hanging fixes
@ 2000-11-08 11:21 Fabrice Gautier
2000-11-08 14:18 ` [ECOS] kernel tests memvar1 and kmemvar1 Chris Morrow
0 siblings, 1 reply; 3+ messages in thread
From: Fabrice Gautier @ 2000-11-08 11:21 UTC (permalink / raw)
To: 'Rolf Manderscheid', ecos-discuss
> -----Original Message-----
> From: Rolf Manderscheid [ mailto:rvm@yottayotta.com ]
> Subject: [ECOS] pc_serial fifo + hanging fixes
>
> I think the declaration ought to be:
> cyg_uint8 pc_inb(int port);
Agreed, seems logical... and if we really want to read a signed value the
compiler should warn us if we don't have the correct transtyping
--
Fabrice Gautier
fabrice_gautier@sdesigns.com
^ permalink raw reply [flat|nested] 3+ messages in thread
* [ECOS] kernel tests memvar1 and kmemvar1
2000-11-08 11:21 [ECOS] pc_serial fifo + hanging fixes Fabrice Gautier
@ 2000-11-08 14:18 ` Chris Morrow
2000-11-08 15:13 ` Chris Morrow
0 siblings, 1 reply; 3+ messages in thread
From: Chris Morrow @ 2000-11-08 14:18 UTC (permalink / raw)
To: ecos-discuss
Both of the kernel tests memvar1 and kmemvar1 have a routine
static void check_in_mp0(cyg_uint8 *p, cyg_int32 size)
{
CYG_TEST_CHECK(NULL != p,
"Allocation failed");
CYG_TEST_CHECK(mem[0] <= p && p+size < mem[1],
"Block outside memory pool");
}
I believe the second test should be
CYG_TEST_CHECK(mem[0] <= p && p+size <= mem[1],
"Block outside memory pool");
The upper bound should allow the equal case, or
perhaps even better
CYG_TEST_CHECK(mem[0] <= p && p[size - 1] < mem[1],
"Block outside memory pool");
--
Chris Morrow YottaYotta Inc.
email: cmorrow@yottayotta.com
phone: (780) 439 9000 ext 227
web: http://www.yottayotta.com
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [ECOS] kernel tests memvar1 and kmemvar1
2000-11-08 14:18 ` [ECOS] kernel tests memvar1 and kmemvar1 Chris Morrow
@ 2000-11-08 15:13 ` Chris Morrow
0 siblings, 0 replies; 3+ messages in thread
From: Chris Morrow @ 2000-11-08 15:13 UTC (permalink / raw)
To: ecos-discuss
Doh!.
This should be
CYG_TEST_CHECK(mem[0] <= p && &p[size - 1] < mem[1],
"Block outside memory pool");
Chris Morrow wrote:
>
> CYG_TEST_CHECK(mem[0] <= p && p[size - 1] < mem[1],
> "Block outside memory pool");
>
--
Chris Morrow YottaYotta Inc.
email: cmorrow@yottayotta.com
phone: (780) 439 9000 ext 227
web: http://www.yottayotta.com
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2000-11-08 15:13 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-11-08 11:21 [ECOS] pc_serial fifo + hanging fixes Fabrice Gautier
2000-11-08 14:18 ` [ECOS] kernel tests memvar1 and kmemvar1 Chris Morrow
2000-11-08 15:13 ` Chris Morrow
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).