aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/litmus.h8
-rw-r--r--src/syscalls.c8
2 files changed, 16 insertions, 0 deletions
diff --git a/include/litmus.h b/include/litmus.h
index adec0ee..70e7552 100644
--- a/include/litmus.h
+++ b/include/litmus.h
@@ -72,6 +72,14 @@ int set_rt_task_param(pid_t pid, struct rt_task* param);
72int get_rt_task_param(pid_t pid, struct rt_task* param); 72int get_rt_task_param(pid_t pid, struct rt_task* param);
73 73
74/** 74/**
75 * Create a new reservation/container (not supported by all plugins).
76 * @param rtype The type of reservation to create.
77 * @param config optional reservation-specific configuration (may be NULL)
78 * @return 0 on success
79 */
80int reservation_create(int rtype, void *config);
81
82/**
75 * Convert a partition number to a CPU identifier 83 * Convert a partition number to a CPU identifier
76 * @param partition Partition number 84 * @param partition Partition number
77 * @return CPU identifier for given partition 85 * @return CPU identifier for given partition
diff --git a/src/syscalls.c b/src/syscalls.c
index d26de3a..3a30ed2 100644
--- a/src/syscalls.c
+++ b/src/syscalls.c
@@ -34,6 +34,14 @@ int get_rt_task_param(pid_t pid, struct rt_task *param)
34 return litmus_syscall(LRT_get_rt_task_param, (unsigned long) &args); 34 return litmus_syscall(LRT_get_rt_task_param, (unsigned long) &args);
35} 35}
36 36
37int reservation_create(int rtype, void *config)
38{
39 union litmus_syscall_args args;
40 args.reservation_create.type = rtype;
41 args.reservation_create.config = config;
42 return litmus_syscall(LRT_reservation_create, (unsigned long) &args);
43}
44
37int sleep_next_period(void) 45int sleep_next_period(void)
38{ 46{
39 return litmus_syscall(LRT_complete_job, 0); 47 return litmus_syscall(LRT_complete_job, 0);