aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorBjoern Brandenburg <bbb@mpi-sws.org>2014-03-19 11:59:03 -0400
committerBjoern Brandenburg <bbb@mpi-sws.org>2014-04-01 13:38:32 -0400
commitc56eeff06a8e9726fe83797a228b82988f4f8ce2 (patch)
treef8454c268c479156d3d7d54acaf54ed600dc839c /include
parentad6403fe186889fd934c7dcb495b1ffb60fae09f (diff)
Add add convenience wrapper and tests for the DFLP
Diffstat (limited to 'include')
-rw-r--r--include/litmus.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/litmus.h b/include/litmus.h
index 0e3b69e..8c54fdc 100644
--- a/include/litmus.h
+++ b/include/litmus.h
@@ -417,6 +417,19 @@ static inline int open_dpcp_sem(int fd, int name, int cpu)
417 return od_openx(fd, DPCP_SEM, name, &cpu); 417 return od_openx(fd, DPCP_SEM, name, &cpu);
418} 418}
419 419
420
421/**
422 * Allocate a semaphore following the DFLP protocol
423 * @param fd File descriptor to associate lock with
424 * @param name Name of the lock, user-chosen integer
425 * @param cpu CPU to associate this lock with
426 * @return Object descriptor for given lock
427 */
428static inline int open_dflp_sem(int fd, int name, int cpu)
429{
430 return od_openx(fd, DFLP_SEM, name, &cpu);
431}
432
420/** 433/**
421 * Do nothing as a syscall 434 * Do nothing as a syscall
422 * @param timestamp Cyclecount before calling 435 * @param timestamp Cyclecount before calling