proc_test: do not overflow preempt_counter on AVR.
[bertos.git] / bertos / kern / proc_test.c
index b4f64c6a97a6751e80e52831c6d0d51b4ecd6bff..5adcbc0160f25adb2cb713614ad20aa016f6fb77 100644 (file)
@@ -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;