This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Questions about cpuload package and cpuload calibration


Dear Andrew
Hello.

I think I understood what you've explained about the cyg_cpuload_calibrate().
But in the do_test(), the value of calibration is always "0".
I'm using following codes to test cpuload & cpuload calibration.
Please check and reply to me.
Thanks in advance.

		KBCHOI

----- Code in testing ---------------------
void cyg_user_start(void)
{
   static char stack[CYGNUM_HAL_STACK_SIZE_MINIMUM];
   static cyg_handle_t handle;
   static cyg_thread thread;

   enable_int(0);
   lo_init();

   CYG_TEST_INIT();
   cyg_thread_create(4,do_test,0,"cpuload",
                    stack,sizeof(stack),&handle,&thread);
   cyg_thread_resume(handle);
   cyg_scheduler_start();
}



void do_test(cyg_addrword_t data)
{
   cyg_uint32  calibration;
   cyg_cpuload_t  cpuload;
   cyg_handle_t   handle;
   cyg_uint32  average_point1s;
   cyg_uint32  average_1s;
   cyg_uint32  average_10s;
   cyg_uint32  i, j, k = 0;

   CYG_TEST_INFO("About to calibrate cpuload");
   cyg_cpuload_calibrate(&calibration);
   xc_printf("calibration = %x \n", calibration);

   CYG_TEST_INFO("Performing 100% load test");
   cyg_cpuload_create(&cpuload, calibration, &handle);

}


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]