diff options
Diffstat (limited to 'ipc/sem.c')
-rw-r--r-- | ipc/sem.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -815,6 +815,13 @@ static int count_semzcnt (struct sem_array * sma, ushort semnum) | |||
815 | struct sem_queue * q; | 815 | struct sem_queue * q; |
816 | 816 | ||
817 | semzcnt = 0; | 817 | semzcnt = 0; |
818 | list_for_each_entry(q, &sma->sem_base[semnum].sem_pending, list) { | ||
819 | struct sembuf * sops = q->sops; | ||
820 | BUG_ON(sops->sem_num != semnum); | ||
821 | if ((sops->sem_op == 0) && !(sops->sem_flg & IPC_NOWAIT)) | ||
822 | semzcnt++; | ||
823 | } | ||
824 | |||
818 | list_for_each_entry(q, &sma->sem_pending, list) { | 825 | list_for_each_entry(q, &sma->sem_pending, list) { |
819 | struct sembuf * sops = q->sops; | 826 | struct sembuf * sops = q->sops; |
820 | int nsops = q->nsops; | 827 | int nsops = q->nsops; |