From: root Date: Fri, 11 Sep 2015 16:31:32 +0000 (+0200) Subject: Finally with a lot of zeros X-Git-Tag: assignment2~3 X-Git-Url: https://git.martlubbers.net/?a=commitdiff_plain;h=05adb904e3477fffe7180c84d6ed73f06e6d26fb;p=des2015.git Finally with a lot of zeros --- diff --git a/mart/ex02/ex02d.c b/mart/ex02/ex02d.c index 6118113..fa5dca4 100644 --- a/mart/ex02/ex02d.c +++ b/mart/ex02/ex02d.c @@ -13,9 +13,8 @@ RT_TASK task1, task2, task3; void demo(void *arg) { - uint64_t waiting_time = *(int *)arg * 100000000; - rt_task_set_periodic(NULL, TM_NOW, waiting_time); - rt_printf("Waiting time: %d\n", waiting_time); + rt_task_set_periodic(NULL, TM_NOW, *(unsigned long long *)arg); + rt_printf("%llu\n", *(unsigned long long *)arg); RT_TASK *curtask; RT_TASK_INFO curtaskinfo; curtask=rt_task_self(); @@ -36,9 +35,9 @@ int main(int argc, char* argv[]) rt_task_create(&task2, "t2", 0, 50, 0); rt_task_create(&task3, "t3", 0, 50, 0); - int num1 = 1; - int num2 = 2; - int num3 = 3; + unsigned long long num1 = 1000000000LLU; + unsigned long long num2 = 2000000000LLU; + unsigned long long num3 = 3000000000LLU; rt_task_start(&task1, &demo, (void *)&num1); rt_task_start(&task2, &demo, (void *)&num2);