diff options
| author | Ingo Molnar <[email protected]> | 2013-11-06 05:39:45 +0000 |
|---|---|---|
| committer | Ingo Molnar <[email protected]> | 2013-11-06 05:39:45 +0000 |
| commit | 97c53b402fcadb50201c23914f614bf8430d9c20 (patch) | |
| tree | 3c9b94e866d150c3a2d8ac853e388c38fade8b45 /ipc/util.h | |
| parent | hung_task debugging: Add tracepoint to report the hang (diff) | |
| parent | Linux 3.12 (diff) | |
| download | kernel-97c53b402fcadb50201c23914f614bf8430d9c20.tar.gz kernel-97c53b402fcadb50201c23914f614bf8430d9c20.zip | |
Merge tag 'v3.12' into core/locking to pick up mutex upates
Signed-off-by: Ingo Molnar <[email protected]>
Diffstat (limited to 'ipc/util.h')
| -rw-r--r-- | ipc/util.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/ipc/util.h b/ipc/util.h index c5f3338ba1fa..f2f5036f2eed 100644 --- a/ipc/util.h +++ b/ipc/util.h @@ -47,6 +47,13 @@ static inline void msg_exit_ns(struct ipc_namespace *ns) { } static inline void shm_exit_ns(struct ipc_namespace *ns) { } #endif +struct ipc_rcu { + struct rcu_head rcu; + atomic_t refcount; +} ____cacheline_aligned_in_smp; + +#define ipc_rcu_to_struct(p) ((void *)(p+1)) + /* * Structure that holds the parameters needed by the ipc operations * (see after) @@ -120,7 +127,8 @@ void ipc_free(void* ptr, int size); */ void* ipc_rcu_alloc(int size); int ipc_rcu_getref(void *ptr); -void ipc_rcu_putref(void *ptr); +void ipc_rcu_putref(void *ptr, void (*func)(struct rcu_head *head)); +void ipc_rcu_free(struct rcu_head *head); struct kern_ipc_perm *ipc_lock(struct ipc_ids *, int); struct kern_ipc_perm *ipc_obtain_object(struct ipc_ids *ids, int id); |
