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 | 63 | ipc/msg.c | if (msq->msg_perm.seq != (unsigned int) msqid / MSGMNI) |
msq | 68 | ipc/msg.c | if (msgsz + msq->msg_cbytes > msq->msg_qbytes) { |
msq | 74 | ipc/msg.c | interruptible_sleep_on (&msq->wwait); |
msq | 86 | ipc/msg.c | || msq->msg_perm.seq != (unsigned int) msqid / MSGMNI) { |
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 | 141 | ipc/msg.c | if (msq->msg_perm.seq != (unsigned int) msqid / MSGMNI) |
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 | 253 | ipc/msg.c | msq->msg_perm.seq = msg_seq; |
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 | 267 | ipc/msg.c | return (unsigned int) msq->msg_perm.seq * MSGMNI + id; |
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 (unsigned int) 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(msq); |
msq | 322 | ipc/msg.c | struct msqid_ds *msq; |
msq | 362 | ipc/msg.c | msq = msgque[msqid]; |
msq | 363 | ipc/msg.c | if (msq == IPC_UNUSED || msq == IPC_NOID) |
msq | 365 | ipc/msg.c | if (ipcperms (&msq->msg_perm, S_IRUGO)) |
msq | 367 | ipc/msg.c | id = (unsigned int) msq->msg_perm.seq * MSGMNI + msqid; |
msq | 368 | ipc/msg.c | tbuf.msg_perm = msq->msg_perm; |
msq | 369 | ipc/msg.c | tbuf.msg_stime = msq->msg_stime; |
msq | 370 | ipc/msg.c | tbuf.msg_rtime = msq->msg_rtime; |
msq | 371 | ipc/msg.c | tbuf.msg_ctime = msq->msg_ctime; |
msq | 372 | ipc/msg.c | tbuf.msg_cbytes = msq->msg_cbytes; |
msq | 373 | ipc/msg.c | tbuf.msg_qnum = msq->msg_qnum; |
msq | 374 | ipc/msg.c | tbuf.msg_qbytes = msq->msg_qbytes; |
msq | 375 | ipc/msg.c | tbuf.msg_lspid = msq->msg_lspid; |
msq | 376 | ipc/msg.c | tbuf.msg_lrpid = msq->msg_lrpid; |
msq | 397 | ipc/msg.c | msq = msgque [id]; |
msq | 398 | ipc/msg.c | if (msq == IPC_UNUSED || msq == IPC_NOID) |
msq | 400 | ipc/msg.c | if (msq->msg_perm.seq != (unsigned int) msqid / MSGMNI) |
msq | 402 | ipc/msg.c | ipcp = &msq->msg_perm; |
msq | 408 | ipc/msg.c | tbuf.msg_perm = msq->msg_perm; |
msq | 409 | ipc/msg.c | tbuf.msg_stime = msq->msg_stime; |
msq | 410 | ipc/msg.c | tbuf.msg_rtime = msq->msg_rtime; |
msq | 411 | ipc/msg.c | tbuf.msg_ctime = msq->msg_ctime; |
msq | 412 | ipc/msg.c | tbuf.msg_cbytes = msq->msg_cbytes; |
msq | 413 | ipc/msg.c | tbuf.msg_qnum = msq->msg_qnum; |
msq | 414 | ipc/msg.c | tbuf.msg_qbytes = msq->msg_qbytes; |
msq | 415 | ipc/msg.c | tbuf.msg_lspid = msq->msg_lspid; |
msq | 416 | ipc/msg.c | tbuf.msg_lrpid = msq->msg_lrpid; |
msq | 425 | ipc/msg.c | msq->msg_qbytes = tbuf.msg_qbytes; |
msq | 430 | ipc/msg.c | msq->msg_ctime = CURRENT_TIME; |