blob: ba513f92b7b9a49cea070d062ee91cf58dbc49a3 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include "litmus.h"
int main(int argc, char** argv)
{
int timeout;
rt_param_t my_param;
if (argc != 2)
{
printf("Usage: %s <timeout in seconds>\n", argv[0]);
exit(1);
}
timeout = atoi(argv[1]);
if (timeout <= 0) {
printf("Timeout must be a positive number.\n");
exit(1);
}
/* printf("This is the kill real-time mode task.\n"
"Expected end of real %u seconds.\n", timeout);
*/
/* get_rt_task_param(getpid(), &my_param);
show_rt_param(&my_param);
*/
sleep(timeout);
set_rt_mode(MODE_NON_RT);
printf("End of real-time mode.\n");
return 0;
}
|