aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorBryan Ward <bcw@cs.unc.edu>2012-08-07 11:04:48 -0400
committerBryan Ward <bcw@cs.unc.edu>2013-04-16 14:32:36 -0400
commit5759d92625cfb9cfdf7defd3b5d8ebedc4f205cf (patch)
tree19243b50a3d2476226a4d0fe0bb304cea8e30fac /include
parent94edd278631ff219b4907322e620d9ffebceef4a (diff)
Setup DGL system calls.
Diffstat (limited to 'include')
-rw-r--r--include/litmus/fdso.h8
-rw-r--r--include/litmus/locking.h18
-rw-r--r--include/litmus/unistd_32.h5
-rw-r--r--include/litmus/unistd_64.h8
4 files changed, 35 insertions, 4 deletions
diff --git a/include/litmus/fdso.h b/include/litmus/fdso.h
index f2115b83f1e4..82f88221f4f0 100644
--- a/include/litmus/fdso.h
+++ b/include/litmus/fdso.h
@@ -12,7 +12,9 @@
12#include <linux/fs.h> 12#include <linux/fs.h>
13#include <linux/slab.h> 13#include <linux/slab.h>
14 14
15#define MAX_OBJECT_DESCRIPTORS 85 15#define MAX_OBJECT_DESCRIPTORS 32
16
17typedef unsigned int resource_mask_t;
16 18
17typedef enum { 19typedef enum {
18 MIN_OBJ_TYPE = 0, 20 MIN_OBJ_TYPE = 0,
@@ -25,8 +27,10 @@ typedef enum {
25 DPCP_SEM = 4, 27 DPCP_SEM = 4,
26 28
27 PCP_SEM = 5, 29 PCP_SEM = 5,
30
31 DGL_SEM = 6,
28 32
29 MAX_OBJ_TYPE = 5 33 MAX_OBJ_TYPE = 6
30} obj_type_t; 34} obj_type_t;
31 35
32struct inode_obj_id { 36struct inode_obj_id {
diff --git a/include/litmus/locking.h b/include/litmus/locking.h
index 4d7b870cb443..e9998946e7de 100644
--- a/include/litmus/locking.h
+++ b/include/litmus/locking.h
@@ -3,6 +3,8 @@
3 3
4struct litmus_lock_ops; 4struct litmus_lock_ops;
5 5
6struct dynamic_group_lock_ops;
7
6/* Generic base struct for LITMUS^RT userspace semaphores. 8/* Generic base struct for LITMUS^RT userspace semaphores.
7 * This structure should be embedded in protocol-specific semaphores. 9 * This structure should be embedded in protocol-specific semaphores.
8 */ 10 */
@@ -25,4 +27,20 @@ struct litmus_lock_ops {
25 void (*deallocate)(struct litmus_lock*); 27 void (*deallocate)(struct litmus_lock*);
26}; 28};
27 29
30struct dynamic_group_lock {
31 struct dynamic_group_lock_ops *ops;
32
33 /* Probably useful for different RNLP variants. */
34 int type;
35};
36
37struct dynamic_group_lock_ops {
38 // Do we need open and close?
39
40 int (*lock)(struct dynamic_group_lock*);
41 int (*unlock)(struct dynamic_group_lock*);
42
43 void (*deallocate)(struct dynamic_group_lock*);
44};
45
28#endif 46#endif
diff --git a/include/litmus/unistd_32.h b/include/litmus/unistd_32.h
index 94264c27d9ac..1c59c92547c5 100644
--- a/include/litmus/unistd_32.h
+++ b/include/litmus/unistd_32.h
@@ -17,5 +17,8 @@
17#define __NR_wait_for_ts_release __LSC(9) 17#define __NR_wait_for_ts_release __LSC(9)
18#define __NR_release_ts __LSC(10) 18#define __NR_release_ts __LSC(10)
19#define __NR_null_call __LSC(11) 19#define __NR_null_call __LSC(11)
20#define __NR_dynamic_group_lock __LSC(12)
21#define __NR_dynamic_group_unlock __LSC(13)
22#define __NR_dynamic_group_add __LSC(14)
20 23
21#define NR_litmus_syscalls 12 24#define NR_litmus_syscalls 15
diff --git a/include/litmus/unistd_64.h b/include/litmus/unistd_64.h
index d5ced0d2642c..93ea10363b46 100644
--- a/include/litmus/unistd_64.h
+++ b/include/litmus/unistd_64.h
@@ -29,5 +29,11 @@ __SYSCALL(__NR_wait_for_ts_release, sys_wait_for_ts_release)
29__SYSCALL(__NR_release_ts, sys_release_ts) 29__SYSCALL(__NR_release_ts, sys_release_ts)
30#define __NR_null_call __LSC(11) 30#define __NR_null_call __LSC(11)
31__SYSCALL(__NR_null_call, sys_null_call) 31__SYSCALL(__NR_null_call, sys_null_call)
32#define __NR_dynamic_group_lock __LSC(12)
33__SYSCALL(__NR_dynamic_group_lock, sys_dynamic_group_lock)
34#define __NR_dynamic_group_unlock __LSC(13)
35__SYSCALL(__NR_dynamic_group_lock, sys_dynamic_group_unlock)
36#define __NR_dynamic_group_add __LSC(14)
37__SYSCALL(__NR_dynamic_group_add, sys_dynamic_group_add)
32 38
33#define NR_litmus_syscalls 12 39#define NR_litmus_syscalls 15