About kernel function _CPU_Counter_difference overflow issue

2021-06-18 Thread wangqiang3
Hello, When reading profiling code, I found function '_CPU_Counter_difference' may overflow, and it will result in 'per_cpu->max_interrupt_time' become a wrong larger value. If a cpu counter is 32bit, and it's resolution is 800ns, the counter will overflow every 3436 seconds(_CPU_Counte

Re: Re: Timeslice issues with preemption enabled

2021-06-15 Thread wangqiang3
Thank you for your reply! To Kuan-Hsun Chen: This is my test eviroment and test case: Test eviroment: rtems-bsp: arm/xilinx_zynq_a9_qemu rtems version: 5.1 Test case: #include #include #include rtems_id Task[3]; static void taskRunner(rtems_task_argument arg) { while(1) { if

Timeslice issues with preemption enabled

2021-06-10 Thread wangqiang3
Description of the issue:I created three tasks, Task A, Task B and Task C. All tasks are based on RTEMS_TIMESLICE | RTEMS_PREEMPT , Task A has a higher priority than other tasks, Task B has the same priority as Task C.Tasks B and C loop forever, Task A sleeps 1 TICK on an endless loop. When I test,

Question on rtems epoch time

2021-04-24 Thread wangqiang3
Hi: I have a question is that why rtems's epoch base year is 1988(#define TOD_BASE_YEAR 1988)? I change TOD_BASE_YEAR to 1970 and TOD_SECONDS_1970_THROUGH_1988 to 0,such as: It work well. So I wonder is that a good method? Thanks! ___ users mail