aboutsummaryrefslogtreecommitdiffstats
path: root/ipc/sem.c
diff options
context:
space:
mode:
Diffstat (limited to 'ipc/sem.c')
-rw-r--r--ipc/sem.c3
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 {
109 int pid; /* process id of requesting process */ 109 int pid; /* process id of requesting process */
110 int status; /* completion status of operation */ 110 int status; /* completion status of operation */
111 struct sembuf *sops; /* array of pending operations */ 111 struct sembuf *sops; /* array of pending operations */
112 struct sembuf *blocking; /* the operation that blocked */
112 int nsops; /* number of operations */ 113 int nsops; /* number of operations */
113 int alter; /* does *sops alter the array? */ 114 int alter; /* does *sops alter the array? */
114}; 115};
@@ -642,6 +643,8 @@ out_of_range:
642 goto undo; 643 goto undo;
643 644
644would_block: 645would_block:
646 q->blocking = sop;
647
645 if (sop->sem_flg & IPC_NOWAIT) 648 if (sop->sem_flg & IPC_NOWAIT)
646 result = -EAGAIN; 649 result = -EAGAIN;
647 else 650 else