This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
CYGIMP_KERNEL_COUNTERS_SORT_LIST
- To: ecos-discuss at sources dot redhat dot com
- Subject: [ECOS] CYGIMP_KERNEL_COUNTERS_SORT_LIST
- From: Phung Te Ha <phungte at orchid dot good dot com>
- Date: Mon, 6 Aug 2001 18:31:40 -0700
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.
...