diff options
author | Manfred Spraul <manfred@colorfullife.com> | 2014-06-06 14:37:49 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-06-06 16:08:15 -0700 |
commit | ed247b7ca0d20b4528eec362f8435594818d7601 (patch) | |
tree | 1ad0072dbfabf441a1aa84b328229b8f09ea6cae /ipc | |
parent | d198cd6d6d02d0a335af2deacb60816ebb4719d1 (diff) | |
download | linux-ed247b7ca0d20b4528eec362f8435594818d7601.tar.bz2 |
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 <manfred@colorfullife.com>
Cc: Davidlohr Bueso <davidlohr.bueso@hp.com>
Cc: Michael Kerrisk <mtk.manpages@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'ipc')
-rw-r--r-- | ipc/sem.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/ipc/sem.c b/ipc/sem.c index b93b561842cd..d61362b31f1e 100644 --- a/ipc/sem.c +++ b/ipc/sem.c @@ -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 |