aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorBjoern Brandenburg <bbb@mpi-sws.org>2013-01-14 08:56:17 -0500
committerBjoern Brandenburg <bbb@mpi-sws.org>2013-02-04 09:11:46 -0500
commitf308b757af1574632627b727c90e08a65b1dfc96 (patch)
treed5a20b70e6f3ebd792b9810c6f55c67cfef52463 /include
parent176e38bd5876bfe691d09d75de8959801eda9da2 (diff)
Add basic locking support to rtspin
This is useful for testing locking protocol implementations (not intended for benchmarking!), and also serves to document how to use the LITMUS^RT locking API.
Diffstat (limited to 'include')
-rw-r--r--include/litmus.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/litmus.h b/include/litmus.h
index 2b6a1dd..58af6b7 100644
--- a/include/litmus.h
+++ b/include/litmus.h
@@ -80,6 +80,13 @@ static inline int od_open(int fd, obj_type_t type, int obj_id)
80 return od_openx(fd, type, obj_id, 0); 80 return od_openx(fd, type, obj_id, 0);
81} 81}
82 82
83int litmus_open_lock(
84 obj_type_t protocol, /* which locking protocol to use, e.g., FMLP_SEM */
85 int lock_id, /* numerical id of the lock, user-specified */
86 const char* namespace, /* path to a shared file */
87 void *config_param); /* any extra info needed by the protocol (such
88 * as CPU under SRP and PCP), may be NULL */
89
83/* real-time locking protocol support */ 90/* real-time locking protocol support */
84int litmus_lock(int od); 91int litmus_lock(int od);
85int litmus_unlock(int od); 92int litmus_unlock(int od);