aboutsummaryrefslogtreecommitdiffstats
path: root/include/litmus.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/litmus.h')
-rw-r--r--include/litmus.h24
1 files changed, 13 insertions, 11 deletions
diff --git a/include/litmus.h b/include/litmus.h
index 632b9e1..2c48766 100644
--- a/include/litmus.h
+++ b/include/litmus.h
@@ -5,15 +5,15 @@
5extern "C" { 5extern "C" {
6#endif 6#endif
7 7
8#include <sys/types.h>
9
8/* Include kernel header. 10/* Include kernel header.
9 * This is required for the rt_param 11 * This is required for the rt_param
10 * and control_page structures. 12 * and control_page structures.
11 */ 13 */
12#include <litmus/rt_param.h> 14#include "litmus/rt_param.h"
13
14#include <sys/types.h>
15 15
16#include "cycles.h" /* for null_call() */ 16#include "asm/cycles.h" /* for null_call() */
17 17
18typedef int pid_t; /* PID of a task */ 18typedef int pid_t; /* PID of a task */
19 19
@@ -61,13 +61,9 @@ static inline int od_open(int fd, obj_type_t type, int obj_id)
61 return od_openx(fd, type, obj_id, 0); 61 return od_openx(fd, type, obj_id, 0);
62} 62}
63 63
64/* FMLP binary semaphore support */ 64/* real-time locking protocol support */
65int fmlp_down(int od); 65int litmus_lock(int od);
66int fmlp_up(int od); 66int litmus_unlock(int od);
67
68/* SRP binary semaphore support */
69int srp_down(int od);
70int srp_up(int od);
71 67
72/* job control*/ 68/* job control*/
73int get_job_no(unsigned int* job_no); 69int get_job_no(unsigned int* job_no);
@@ -113,6 +109,12 @@ static inline lt_t ms2lt(unsigned long milliseconds)
113 return __NS_PER_MS * milliseconds; 109 return __NS_PER_MS * milliseconds;
114} 110}
115 111
112/* CPU time consumed so far in seconds */
113double cputime(void);
114
115/* wall-clock time in seconds */
116double wctime(void);
117
116/* semaphore allocation */ 118/* semaphore allocation */
117 119
118static inline int open_fmlp_sem(int fd, int name) 120static inline int open_fmlp_sem(int fd, int name)