aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjoern Brandenburg <bbb@mpi-sws.org>2014-05-05 12:10:25 -0400
committerBjoern Brandenburg <bbb@mpi-sws.org>2015-09-08 01:12:22 -0400
commitae1d5e700bbf4b8b1f1ecfaab69f2ef8d55e3563 (patch)
treea5ba13a0fb10ee787f1e4c2b8fe40b4bc40e11a1
parent0394bde254c6c5dadb494d3626f7e3b909f19e0c (diff)
Add syscall get_current_budget()
-rw-r--r--include/litmus.h10
-rw-r--r--src/syscalls.c7
2 files changed, 17 insertions, 0 deletions
diff --git a/include/litmus.h b/include/litmus.h
index b9dbdb5..72f1ad4 100644
--- a/include/litmus.h
+++ b/include/litmus.h
@@ -402,6 +402,16 @@ static inline int open_dflp_sem(int fd, int name, int cpu)
402} 402}
403 403
404/** 404/**
405 * Get budget information from the scheduler (in nanoseconds).
406 * @param expended pointer to time value in wich the total
407 * amount of already used-up budget will be stored.
408 * @param remaining pointer to time value in wich the total
409 * amount of remaining budget will be stored.
410 */
411
412int get_current_budget(lt_t *expended, lt_t *remaining);
413
414/**
405 * Do nothing as a syscall 415 * Do nothing as a syscall
406 * @param timestamp Cyclecount before calling 416 * @param timestamp Cyclecount before calling
407 * Can be used for syscall overhead measuring */ 417 * Can be used for syscall overhead measuring */
diff --git a/src/syscalls.c b/src/syscalls.c
index c68f15b..0ee1a80 100644
--- a/src/syscalls.c
+++ b/src/syscalls.c
@@ -86,3 +86,10 @@ int null_call(cycles_t *timestamp)
86{ 86{
87 return syscall(__NR_null_call, timestamp); 87 return syscall(__NR_null_call, timestamp);
88} 88}
89
90int get_current_budget(
91 lt_t *expended,
92 lt_t *remaining)
93{
94 return syscall(__NR_get_current_budget, expended, remaining);
95}