mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
ipc/sem.c: store which operation blocks in perform_atomic_semop()
Preparation for the next patch: In the slow-path of perform_atomic_semop(), store a pointer to the operation that caused the operation to block. Signed-off-by: Manfred Spraul <[email protected]> Cc: Davidlohr Bueso <[email protected]> Cc: Michael Kerrisk <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
d198cd6d6d
commit
ed247b7ca0
1 changed files with 3 additions and 0 deletions
|
|
@ -109,6 +109,7 @@ struct sem_queue {
|
|||
int pid; /* process id of requesting process */
|
||||
int status; /* completion status of operation */
|
||||
struct sembuf *sops; /* array of pending operations */
|
||||
struct sembuf *blocking; /* the operation that blocked */
|
||||
int nsops; /* number of operations */
|
||||
int alter; /* does *sops alter the array? */
|
||||
};
|
||||
|
|
@ -642,6 +643,8 @@ out_of_range:
|
|||
goto undo;
|
||||
|
||||
would_block:
|
||||
q->blocking = sop;
|
||||
|
||||
if (sop->sem_flg & IPC_NOWAIT)
|
||||
result = -EAGAIN;
|
||||
else
|
||||
|
|
|
|||
Loading…
Reference in a new issue