From efaa76e41313ea66ca001bd09948d90c52e58c5c Mon Sep 17 00:00:00 2001 From: arighi Date: Thu, 18 Mar 2010 11:49:59 +0000 Subject: [PATCH] proc_test: do not overflow preempt_counter on AVR. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@3237 38d2e660-2303-0410-9eaa-f027e97ec537 --- bertos/kern/proc_test.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bertos/kern/proc_test.c b/bertos/kern/proc_test.c index b4f64c6a..5adcbc01 100644 --- a/bertos/kern/proc_test.c +++ b/bertos/kern/proc_test.c @@ -112,7 +112,7 @@ STATIC_ASSERT(TASKS <= countof(prime_numbers)); /* Time to run each preemptible thread (in seconds) */ #define TIME 10 -static unsigned int preempt_counter[TASKS]; +static unsigned long preempt_counter[TASKS]; static unsigned int preempt_done[TASKS]; #endif @@ -198,7 +198,7 @@ static int worker_test(void) static void preempt_worker(void) { ssize_t pid = (ssize_t)proc_currentUserData(); - unsigned int *my_count = &preempt_counter[pid - 1]; + unsigned long *my_count = &preempt_counter[pid - 1]; ticks_t start, stop; int i; -- 2.25.1