* [ECOS] CYGIMP_KERNEL_COUNTERS_SORT_LIST
@ 2001-08-06 18:33 Phung Te Ha
0 siblings, 0 replies; only message in thread
From: Phung Te Ha @ 2001-08-06 18:33 UTC (permalink / raw)
To: ecos-discuss
Hi everyone,
Would like to have your idea on the following:
The code in kernel/.../clock.cxx under #ifdef CYGIMP_KERNEL_COUNTERS_SORT_LIST is off
in the normal case and my test program below works OK.
Now if I turn this code on by defining CYGIMP_KERNEL_COUNTERS_SORT_LIST, the thread
with small delay seems to be forgotten from the list...
The behavior is the same on a edb7xxx and on linux system.
Thanks for your idea.
Phungte
TEST PROGRAM:
#include <cyg/kernel/kapi.h>
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
char stack[4096];
cyg_thread thread_s;
cyg_handle_t simple_threadA;
char stack2[4096];
cyg_thread thread_x;
cyg_handle_t simple_threadB;
void simple_program(cyg_addrword_t data)
{
printf("Beginning threadA\n");
for (;;) {
cyg_thread_delay(data);
printf(">>>>>>>>>.%d.\n", data);
}
}
void cyg_user_start(void)
{
cyg_thread_create(20, simple_program, (cyg_addrword_t) 400,
"Thread A", (void *) &stack, 4096,
&simple_threadA, &thread_s);
cyg_thread_resume(simple_threadA);
cyg_thread_create(20, simple_program, (cyg_addrword_t) 100,
"Thread B", (void *) &stack2, 4096,
&simple_threadB, &thread_x);
cyg_thread_resume(simple_threadB);
}
OUTPUT:
Starting program: /home/phungte/good/mobi/ecos/development/tick/obj.linux/tickTest
Beginning threadA
Beginning threadA
>>>>>>>>>.100.
>>>>>>>>>.100.
>>>>>>>>>.100.
>>>>>>>>>.400.
>>>>>>>>>.400.
>>>>>>>>>.400.
>>>>>>>>>.400.
...
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2001-08-06 18:33 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-08-06 18:33 [ECOS] CYGIMP_KERNEL_COUNTERS_SORT_LIST Phung Te Ha
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).