From 5759d92625cfb9cfdf7defd3b5d8ebedc4f205cf Mon Sep 17 00:00:00 2001 From: Bryan Ward Date: Tue, 7 Aug 2012 11:04:48 -0400 Subject: Setup DGL system calls. --- include/litmus/fdso.h | 8 ++++++-- include/litmus/locking.h | 18 ++++++++++++++++++ include/litmus/unistd_32.h | 5 ++++- include/litmus/unistd_64.h | 8 +++++++- 4 files changed, 35 insertions(+), 4 deletions(-) (limited to 'include') 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 @@ #include #include -#define MAX_OBJECT_DESCRIPTORS 85 +#define MAX_OBJECT_DESCRIPTORS 32 + +typedef unsigned int resource_mask_t; typedef enum { MIN_OBJ_TYPE = 0, @@ -25,8 +27,10 @@ typedef enum { DPCP_SEM = 4, PCP_SEM = 5, + + DGL_SEM = 6, - MAX_OBJ_TYPE = 5 + MAX_OBJ_TYPE = 6 } obj_type_t; struct 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 @@ struct litmus_lock_ops; +struct dynamic_group_lock_ops; + /* Generic base struct for LITMUS^RT userspace semaphores. * This structure should be embedded in protocol-specific semaphores. */ @@ -25,4 +27,20 @@ struct litmus_lock_ops { void (*deallocate)(struct litmus_lock*); }; +struct dynamic_group_lock { + struct dynamic_group_lock_ops *ops; + + /* Probably useful for different RNLP variants. */ + int type; +}; + +struct dynamic_group_lock_ops { + // Do we need open and close? + + int (*lock)(struct dynamic_group_lock*); + int (*unlock)(struct dynamic_group_lock*); + + void (*deallocate)(struct dynamic_group_lock*); +}; + #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 @@ #define __NR_wait_for_ts_release __LSC(9) #define __NR_release_ts __LSC(10) #define __NR_null_call __LSC(11) +#define __NR_dynamic_group_lock __LSC(12) +#define __NR_dynamic_group_unlock __LSC(13) +#define __NR_dynamic_group_add __LSC(14) -#define NR_litmus_syscalls 12 +#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) __SYSCALL(__NR_release_ts, sys_release_ts) #define __NR_null_call __LSC(11) __SYSCALL(__NR_null_call, sys_null_call) +#define __NR_dynamic_group_lock __LSC(12) +__SYSCALL(__NR_dynamic_group_lock, sys_dynamic_group_lock) +#define __NR_dynamic_group_unlock __LSC(13) +__SYSCALL(__NR_dynamic_group_lock, sys_dynamic_group_unlock) +#define __NR_dynamic_group_add __LSC(14) +__SYSCALL(__NR_dynamic_group_add, sys_dynamic_group_add) -#define NR_litmus_syscalls 12 +#define NR_litmus_syscalls 15 -- cgit v1.2.2