mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
ipc/sem.c: remove private structures from public header file
include/linux/sem.h contains several structures that are only used within ipc/sem.c. The patch moves them into ipc/sem.c - there is no need to expose the structures to the whole kernel. No functional changes, only whitespace cleanups and 80-char per line fixes. Signed-off-by: Manfred Spraul <[email protected]> Acked-by: Peter Zijlstra <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: Mike Galbraith <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
0b0577f608
commit
e57940d719
2 changed files with 46 additions and 42 deletions
46
ipc/sem.c
46
ipc/sem.c
|
|
@ -90,6 +90,52 @@
|
|||
#include <asm/uaccess.h>
|
||||
#include "util.h"
|
||||
|
||||
/* One semaphore structure for each semaphore in the system. */
|
||||
struct sem {
|
||||
int semval; /* current value */
|
||||
int sempid; /* pid of last operation */
|
||||
struct list_head sem_pending; /* pending single-sop operations */
|
||||
};
|
||||
|
||||
/* One queue for each sleeping process in the system. */
|
||||
struct sem_queue {
|
||||
struct list_head simple_list; /* queue of pending operations */
|
||||
struct list_head list; /* queue of pending operations */
|
||||
struct task_struct *sleeper; /* this process */
|
||||
struct sem_undo *undo; /* undo structure */
|
||||
int pid; /* process id of requesting process */
|
||||
int status; /* completion status of operation */
|
||||
struct sembuf *sops; /* array of pending operations */
|
||||
int nsops; /* number of operations */
|
||||
int alter; /* does *sops alter the array? */
|
||||
};
|
||||
|
||||
/* Each task has a list of undo requests. They are executed automatically
|
||||
* when the process exits.
|
||||
*/
|
||||
struct sem_undo {
|
||||
struct list_head list_proc; /* per-process list: *
|
||||
* all undos from one process
|
||||
* rcu protected */
|
||||
struct rcu_head rcu; /* rcu struct for sem_undo */
|
||||
struct sem_undo_list *ulp; /* back ptr to sem_undo_list */
|
||||
struct list_head list_id; /* per semaphore array list:
|
||||
* all undos for one array */
|
||||
int semid; /* semaphore set identifier */
|
||||
short *semadj; /* array of adjustments */
|
||||
/* one per semaphore */
|
||||
};
|
||||
|
||||
/* sem_undo_list controls shared access to the list of sem_undo structures
|
||||
* that may be shared among all a CLONE_SYSVSEM task group.
|
||||
*/
|
||||
struct sem_undo_list {
|
||||
atomic_t refcnt;
|
||||
spinlock_t lock;
|
||||
struct list_head list_proc;
|
||||
};
|
||||
|
||||
|
||||
#define sem_ids(ns) ((ns)->ids[IPC_SEM_IDS])
|
||||
|
||||
#define sem_unlock(sma) ipc_unlock(&(sma)->sem_perm)
|
||||
|
|
|
|||
Loading…
Reference in a new issue