tag | line | file | source code |
msq | 42 | ipc/msg.c | struct msqid_ds *msq; |
msq | 57 | ipc/msg.c | msq = msgque [id]; |
msq | 58 | ipc/msg.c | if (msq == IPC_UNUSED || msq == IPC_NOID) |
msq | 60 | ipc/msg.c | ipcp = &msq->msg_perm; |
msq | 68 | ipc/msg.c | if (msgsz + msq->msg_cbytes > msq->msg_qbytes) { |
msq | 74 | ipc/msg.c | interruptible_sleep_on (&msq->wwait); |
msq | 92 | ipc/msg.c | if (!msq->msg_first) |
msq | 93 | ipc/msg.c | msq->msg_first = msq->msg_last = msgh; |
msq | 95 | ipc/msg.c | msq->msg_last->msg_next = msgh; |
msq | 96 | ipc/msg.c | msq->msg_last = msgh; |
msq | 100 | ipc/msg.c | msq->msg_cbytes += msgsz; |
msq | 103 | ipc/msg.c | msq->msg_qnum++; |
msq | 104 | ipc/msg.c | msq->msg_lspid = current->pid; |
msq | 105 | ipc/msg.c | msq->msg_stime = CURRENT_TIME; |
msq | 106 | ipc/msg.c | if (msq->rwait) |
msq | 107 | ipc/msg.c | wake_up (&msq->rwait); |
msq | 114 | ipc/msg.c | struct msqid_ds *msq; |
msq | 129 | ipc/msg.c | msq = msgque [id]; |
msq | 130 | ipc/msg.c | if (msq == IPC_NOID || msq == IPC_UNUSED) |
msq | 132 | ipc/msg.c | ipcp = &msq->msg_perm; |
msq | 146 | ipc/msg.c | nmsg = msq->msg_first; |
msq | 149 | ipc/msg.c | for (tmsg = msq->msg_first; tmsg; |
msq | 155 | ipc/msg.c | for (tmsg = msq->msg_first; tmsg; |
msq | 162 | ipc/msg.c | for (leastp = tmsg = msq->msg_first; tmsg; |
msq | 174 | ipc/msg.c | if (nmsg == msq->msg_first) |
msq | 175 | ipc/msg.c | msq->msg_first = nmsg->msg_next; |
msq | 177 | ipc/msg.c | for (tmsg= msq->msg_first; tmsg; |
msq | 182 | ipc/msg.c | if (nmsg == msq->msg_last) |
msq | 183 | ipc/msg.c | msq->msg_last = tmsg; |
msq | 185 | ipc/msg.c | if (!(--msq->msg_qnum)) |
msq | 186 | ipc/msg.c | msq->msg_last = msq->msg_first = NULL; |
msq | 188 | ipc/msg.c | msq->msg_rtime = CURRENT_TIME; |
msq | 189 | ipc/msg.c | msq->msg_lrpid = current->pid; |
msq | 192 | ipc/msg.c | msq->msg_cbytes -= nmsg->msg_ts; |
msq | 193 | ipc/msg.c | if (msq->wwait) |
msq | 194 | ipc/msg.c | wake_up (&msq->wwait); |
msq | 204 | ipc/msg.c | interruptible_sleep_on (&msq->rwait); |
msq | 214 | ipc/msg.c | struct msqid_ds *msq; |
msq | 217 | ipc/msg.c | while ((msq = msgque[id]) == IPC_NOID) |
msq | 219 | ipc/msg.c | if (msq == IPC_UNUSED) |
msq | 221 | ipc/msg.c | if (key == msq->msg_perm.key) |
msq | 230 | ipc/msg.c | struct msqid_ds *msq; |
msq | 241 | ipc/msg.c | msq = (struct msqid_ds *) kmalloc (sizeof (*msq), GFP_KERNEL); |
msq | 242 | ipc/msg.c | if (!msq) { |
msq | 248 | ipc/msg.c | ipcp = &msq->msg_perm; |
msq | 254 | ipc/msg.c | msq->msg_first = msq->msg_last = NULL; |
msq | 255 | ipc/msg.c | msq->rwait = msq->wwait = NULL; |
msq | 256 | ipc/msg.c | msq->msg_cbytes = msq->msg_qnum = 0; |
msq | 257 | ipc/msg.c | msq->msg_lspid = msq->msg_lrpid = 0; |
msq | 258 | ipc/msg.c | msq->msg_stime = msq->msg_rtime = 0; |
msq | 259 | ipc/msg.c | msq->msg_qbytes = MSGMNB; |
msq | 260 | ipc/msg.c | msq->msg_ctime = CURRENT_TIME; |
msq | 263 | ipc/msg.c | msgque[id] = msq; |
msq | 273 | ipc/msg.c | struct msqid_ds *msq; |
msq | 284 | ipc/msg.c | msq = msgque[id]; |
msq | 285 | ipc/msg.c | if (msq == IPC_UNUSED || msq == IPC_NOID) |
msq | 287 | ipc/msg.c | if (ipcperms(&msq->msg_perm, msgflg)) |
msq | 289 | ipc/msg.c | return msq->msg_perm.seq * MSGMNI +id; |
msq | 294 | ipc/msg.c | struct msqid_ds *msq = msgque[id]; |
msq | 297 | ipc/msg.c | msq->msg_perm.seq++; |
msq | 299 | ipc/msg.c | msgbytes -= msq->msg_cbytes; |
msq | 304 | ipc/msg.c | while (msq->rwait || msq->wwait) { |
msq | 305 | ipc/msg.c | if (msq->rwait) |
msq | 306 | ipc/msg.c | wake_up (&msq->rwait); |
msq | 307 | ipc/msg.c | if (msq->wwait) |
msq | 308 | ipc/msg.c | wake_up (&msq->wwait); |
msq | 311 | ipc/msg.c | for (msgp = msq->msg_first; msgp; msgp = msgh ) { |
msq | 316 | ipc/msg.c | kfree_s (msq, sizeof (*msq)); |
msq | 322 | ipc/msg.c | struct msqid_ds *msq, tbuf; |
msq | 356 | ipc/msg.c | err = verify_area (VERIFY_WRITE, buf, sizeof (*msq)); |
msq | 361 | ipc/msg.c | msq = msgque[msqid]; |
msq | 362 | ipc/msg.c | if (msq == IPC_UNUSED || msq == IPC_NOID) |
msq | 364 | ipc/msg.c | if (ipcperms (&msq->msg_perm, S_IRUGO)) |
msq | 366 | ipc/msg.c | id = msqid + msq->msg_perm.seq * MSGMNI; |
msq | 367 | ipc/msg.c | memcpy_tofs (buf, msq, sizeof(*msq)); |
msq | 377 | ipc/msg.c | err = verify_area (VERIFY_WRITE, buf, sizeof(*msq)); |
msq | 384 | ipc/msg.c | msq = msgque [id]; |
msq | 385 | ipc/msg.c | if (msq == IPC_UNUSED || msq == IPC_NOID) |
msq | 387 | ipc/msg.c | ipcp = &msq->msg_perm; |
msq | 395 | ipc/msg.c | memcpy_tofs (buf, msq, sizeof (*msq)); |
msq | 408 | ipc/msg.c | msq->msg_qbytes = tbuf.msg_qbytes; |
msq | 413 | ipc/msg.c | msq->msg_ctime = CURRENT_TIME; |