From mboxrd@z Thu Jan 1 00:00:00 1970 From: Phung Te Ha To: ecos-discuss@sources.redhat.com Subject: [ECOS] CYGIMP_KERNEL_COUNTERS_SORT_LIST Date: Mon, 06 Aug 2001 18:33:00 -0000 Message-id: <200108070131.f771Veh11619@orchid.good.com> X-SW-Source: 2001-08/msg00181.html 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 #include #include #include 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. ...