Lines Matching refs:msgtyp
996 static inline int convert_mode(long *msgtyp, int msgflg)
1002 * msgtyp = 0 => get first.
1003 * msgtyp > 0 => get first message of matching type.
1004 * msgtyp < 0 => get message with least type must be < abs(msgtype).
1006 if (*msgtyp == 0)
1008 if (*msgtyp < 0) {
1009 if (*msgtyp == LONG_MIN) /* -LONG_MIN is undefined */
1010 *msgtyp = LONG_MAX;
1012 *msgtyp = -*msgtyp;
1068 static struct msg_msg *find_msg(struct msg_queue *msq, long *msgtyp, int mode)
1074 if (testmsg(msg, *msgtyp, mode) &&
1076 *msgtyp, mode)) {
1078 *msgtyp = msg->m_type - 1;
1081 if (*msgtyp == count)
1092 static long do_msgrcv(int msqid, void __user *buf, size_t bufsz, long msgtyp, int msgflg,
1113 mode = convert_mode(&msgtyp, msgflg);
1138 msg = find_msg(msq, &msgtyp, mode);
1177 msr_d.r_msgtype = msgtyp;
1259 long msgtyp, int msgflg)
1261 return do_msgrcv(msqid, msgp, msgsz, msgtyp, msgflg, do_msg_fill);
1265 long, msgtyp, int, msgflg)
1267 return ksys_msgrcv(msqid, msgp, msgsz, msgtyp, msgflg);
1286 compat_long_t msgtyp, int msgflg)
1288 return do_msgrcv(msqid, compat_ptr(msgp), (ssize_t)msgsz, (long)msgtyp,
1293 compat_ssize_t, msgsz, compat_long_t, msgtyp,
1296 return compat_ksys_msgrcv(msqid, msgp, msgsz, msgtyp, msgflg);