diff options
Diffstat (limited to 'ipc/sem.c')
-rw-r--r-- | ipc/sem.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -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 | ||
644 | would_block: | 645 | would_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 |