tag | line | file | source code |
msq | 52 | ipc/msg.c | struct msqid_ds *msq; |
msq | 75 | ipc/msg.c | msq = msgque [id]; |
msq | 76 | ipc/msg.c | if (msq == IPC_UNUSED || msq == IPC_NOID) |
msq | 78 | ipc/msg.c | ipcp = &msq->msg_perm; |
msq | 81 | ipc/msg.c | if (msq->msg_perm.seq != (unsigned int) msqid / MSGMNI) |
msq | 92 | ipc/msg.c | if (msgsz + msq->msg_cbytes > msq->msg_qbytes) { |
msq | 103 | ipc/msg.c | interruptible_sleep_on (&msq->wwait); |
msq | 133 | ipc/msg.c | || msq->msg_perm.seq != (unsigned int) msqid / MSGMNI) { |
msq | 139 | ipc/msg.c | if (!msq->msg_first) |
msq | 140 | ipc/msg.c | msq->msg_first = msq->msg_last = msgh; |
msq | 142 | ipc/msg.c | msq->msg_last->msg_next = msgh; |
msq | 143 | ipc/msg.c | msq->msg_last = msgh; |
msq | 147 | ipc/msg.c | msq->msg_cbytes += msgsz; |
msq | 150 | ipc/msg.c | msq->msg_qnum++; |
msq | 151 | ipc/msg.c | msq->msg_lspid = current->pid; |
msq | 152 | ipc/msg.c | msq->msg_stime = CURRENT_TIME; |
msq | 153 | ipc/msg.c | if (msq->rwait) |
msq | 154 | ipc/msg.c | wake_up (&msq->rwait); |
msq | 166 | ipc/msg.c | struct msqid_ds *msq; |
msq | 169 | ipc/msg.c | msq = msgque [ (unsigned int) kerneld_msqid % MSGMNI ]; |
msq | 170 | ipc/msg.c | if (msq == IPC_NOID || msq == IPC_UNUSED) |
msq | 173 | ipc/msg.c | for (tmsg = msq->msg_first; tmsg; tmsg = tmsg->msg_next) |
msq | 189 | ipc/msg.c | struct msqid_ds *msq; |
msq | 210 | ipc/msg.c | msq = msgque [id]; |
msq | 211 | ipc/msg.c | if (msq == IPC_NOID || msq == IPC_UNUSED) |
msq | 213 | ipc/msg.c | ipcp = &msq->msg_perm; |
msq | 232 | ipc/msg.c | if (msq->msg_perm.seq != (unsigned int) msqid / MSGMNI) |
msq | 244 | ipc/msg.c | nmsg = msq->msg_first; |
msq | 247 | ipc/msg.c | for (tmsg = msq->msg_first; tmsg; |
msq | 253 | ipc/msg.c | for (tmsg = msq->msg_first; tmsg; |
msq | 260 | ipc/msg.c | for (leastp = tmsg = msq->msg_first; tmsg; |
msq | 273 | ipc/msg.c | if (nmsg == msq->msg_first) |
msq | 274 | ipc/msg.c | msq->msg_first = nmsg->msg_next; |
msq | 276 | ipc/msg.c | for (tmsg = msq->msg_first; tmsg; |
msq | 281 | ipc/msg.c | if (nmsg == msq->msg_last) |
msq | 282 | ipc/msg.c | msq->msg_last = tmsg; |
msq | 284 | ipc/msg.c | if (!(--msq->msg_qnum)) |
msq | 285 | ipc/msg.c | msq->msg_last = msq->msg_first = NULL; |
msq | 287 | ipc/msg.c | msq->msg_rtime = CURRENT_TIME; |
msq | 288 | ipc/msg.c | msq->msg_lrpid = current->pid; |
msq | 291 | ipc/msg.c | msq->msg_cbytes -= nmsg->msg_ts; |
msq | 292 | ipc/msg.c | if (msq->wwait) |
msq | 293 | ipc/msg.c | wake_up (&msq->wwait); |
msq | 334 | ipc/msg.c | interruptible_sleep_on (&msq->rwait); |
msq | 357 | ipc/msg.c | struct msqid_ds *msq; |
msq | 360 | ipc/msg.c | while ((msq = msgque[id]) == IPC_NOID) |
msq | 362 | ipc/msg.c | if (msq == IPC_UNUSED) |
msq | 364 | ipc/msg.c | if (key == msq->msg_perm.key) |
msq | 373 | ipc/msg.c | struct msqid_ds *msq; |
msq | 384 | ipc/msg.c | msq = (struct msqid_ds *) kmalloc (sizeof (*msq), GFP_KERNEL); |
msq | 385 | ipc/msg.c | if (!msq) { |
msq | 391 | ipc/msg.c | ipcp = &msq->msg_perm; |
msq | 396 | ipc/msg.c | msq->msg_perm.seq = msg_seq; |
msq | 397 | ipc/msg.c | msq->msg_first = msq->msg_last = NULL; |
msq | 398 | ipc/msg.c | msq->rwait = msq->wwait = NULL; |
msq | 399 | ipc/msg.c | msq->msg_cbytes = msq->msg_qnum = 0; |
msq | 400 | ipc/msg.c | msq->msg_lspid = msq->msg_lrpid = 0; |
msq | 401 | ipc/msg.c | msq->msg_stime = msq->msg_rtime = 0; |
msq | 402 | ipc/msg.c | msq->msg_qbytes = MSGMNB; |
msq | 403 | ipc/msg.c | msq->msg_ctime = CURRENT_TIME; |
msq | 406 | ipc/msg.c | msgque[id] = msq; |
msq | 410 | ipc/msg.c | return (unsigned int) msq->msg_perm.seq * MSGMNI + id; |
msq | 416 | ipc/msg.c | struct msqid_ds *msq; |
msq | 448 | ipc/msg.c | msq = msgque[id]; |
msq | 449 | ipc/msg.c | if (msq == IPC_UNUSED || msq == IPC_NOID) |
msq | 451 | ipc/msg.c | if (ipcperms(&msq->msg_perm, msgflg)) |
msq | 453 | ipc/msg.c | return (unsigned int) msq->msg_perm.seq * MSGMNI + id; |
msq | 458 | ipc/msg.c | struct msqid_ds *msq = msgque[id]; |
msq | 461 | ipc/msg.c | msq->msg_perm.seq++; |
msq | 463 | ipc/msg.c | msgbytes -= msq->msg_cbytes; |
msq | 468 | ipc/msg.c | while (msq->rwait || msq->wwait) { |
msq | 469 | ipc/msg.c | if (msq->rwait) |
msq | 470 | ipc/msg.c | wake_up (&msq->rwait); |
msq | 471 | ipc/msg.c | if (msq->wwait) |
msq | 472 | ipc/msg.c | wake_up (&msq->wwait); |
msq | 475 | ipc/msg.c | for (msgp = msq->msg_first; msgp; msgp = msgh ) { |
msq | 480 | ipc/msg.c | kfree(msq); |
msq | 486 | ipc/msg.c | struct msqid_ds *msq; |
msq | 526 | ipc/msg.c | msq = msgque[msqid]; |
msq | 527 | ipc/msg.c | if (msq == IPC_UNUSED || msq == IPC_NOID) |
msq | 529 | ipc/msg.c | if (ipcperms (&msq->msg_perm, S_IRUGO)) |
msq | 531 | ipc/msg.c | id = (unsigned int) msq->msg_perm.seq * MSGMNI + msqid; |
msq | 532 | ipc/msg.c | tbuf.msg_perm = msq->msg_perm; |
msq | 533 | ipc/msg.c | tbuf.msg_stime = msq->msg_stime; |
msq | 534 | ipc/msg.c | tbuf.msg_rtime = msq->msg_rtime; |
msq | 535 | ipc/msg.c | tbuf.msg_ctime = msq->msg_ctime; |
msq | 536 | ipc/msg.c | tbuf.msg_cbytes = msq->msg_cbytes; |
msq | 537 | ipc/msg.c | tbuf.msg_qnum = msq->msg_qnum; |
msq | 538 | ipc/msg.c | tbuf.msg_qbytes = msq->msg_qbytes; |
msq | 539 | ipc/msg.c | tbuf.msg_lspid = msq->msg_lspid; |
msq | 540 | ipc/msg.c | tbuf.msg_lrpid = msq->msg_lrpid; |
msq | 561 | ipc/msg.c | msq = msgque [id]; |
msq | 562 | ipc/msg.c | if (msq == IPC_UNUSED || msq == IPC_NOID) |
msq | 564 | ipc/msg.c | if (msq->msg_perm.seq != (unsigned int) msqid / MSGMNI) |
msq | 566 | ipc/msg.c | ipcp = &msq->msg_perm; |
msq | 572 | ipc/msg.c | tbuf.msg_perm = msq->msg_perm; |
msq | 573 | ipc/msg.c | tbuf.msg_stime = msq->msg_stime; |
msq | 574 | ipc/msg.c | tbuf.msg_rtime = msq->msg_rtime; |
msq | 575 | ipc/msg.c | tbuf.msg_ctime = msq->msg_ctime; |
msq | 576 | ipc/msg.c | tbuf.msg_cbytes = msq->msg_cbytes; |
msq | 577 | ipc/msg.c | tbuf.msg_qnum = msq->msg_qnum; |
msq | 578 | ipc/msg.c | tbuf.msg_qbytes = msq->msg_qbytes; |
msq | 579 | ipc/msg.c | tbuf.msg_lspid = msq->msg_lspid; |
msq | 580 | ipc/msg.c | tbuf.msg_lrpid = msq->msg_lrpid; |
msq | 589 | ipc/msg.c | msq->msg_qbytes = tbuf.msg_qbytes; |
msq | 594 | ipc/msg.c | msq->msg_ctime = CURRENT_TIME; |