/* 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
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;
if (UNLIKELY(*my_count == (unsigned int)~0))
*my_count = 1;
}
- PROC_ATOMIC(kprintf("> %s[%zd] completed: (counter = %d)\n",
+ PROC_ATOMIC(kprintf("> %s[%zd] completed: (counter = %lu)\n",
__func__, pid, *my_count));
for (i = 0; i < TASKS; i++)
if (!preempt_counter[i])