• Home
  • Raw
  • Download

Lines Matching refs:attr

142 	struct mq_attr attr;  member
229 info->attr.mq_curmsgs++; in msg_insert()
264 if (info->attr.mq_curmsgs) { in msg_get()
268 info->attr.mq_curmsgs = 0; in msg_get()
287 info->attr.mq_curmsgs--; in msg_get()
294 struct mq_attr *attr) in mqueue_get_inode() argument
329 memset(&info->attr, 0, sizeof(info->attr)); in mqueue_get_inode()
330 info->attr.mq_maxmsg = min(ipc_ns->mq_msg_max, in mqueue_get_inode()
332 info->attr.mq_msgsize = min(ipc_ns->mq_msgsize_max, in mqueue_get_inode()
334 if (attr) { in mqueue_get_inode()
335 info->attr.mq_maxmsg = attr->mq_maxmsg; in mqueue_get_inode()
336 info->attr.mq_msgsize = attr->mq_msgsize; in mqueue_get_inode()
353 if (info->attr.mq_maxmsg <= 0 || info->attr.mq_msgsize <= 0) in mqueue_get_inode()
356 if (info->attr.mq_maxmsg > HARD_MSGMAX || in mqueue_get_inode()
357 info->attr.mq_msgsize > HARD_MSGSIZEMAX) in mqueue_get_inode()
360 if (info->attr.mq_maxmsg > ipc_ns->mq_msg_max || in mqueue_get_inode()
361 info->attr.mq_msgsize > ipc_ns->mq_msgsize_max) in mqueue_get_inode()
366 if (info->attr.mq_msgsize > ULONG_MAX/info->attr.mq_maxmsg) in mqueue_get_inode()
368 mq_treesize = info->attr.mq_maxmsg * sizeof(struct msg_msg) + in mqueue_get_inode()
369 min_t(unsigned int, info->attr.mq_maxmsg, MQ_PRIO_MAX) * in mqueue_get_inode()
371 mq_bytes = info->attr.mq_maxmsg * info->attr.mq_msgsize; in mqueue_get_inode()
542 mq_treesize = info->attr.mq_maxmsg * sizeof(struct msg_msg) + in mqueue_evict_inode()
543 min_t(unsigned int, info->attr.mq_maxmsg, MQ_PRIO_MAX) * in mqueue_evict_inode()
546 mq_bytes = mq_treesize + (info->attr.mq_maxmsg * in mqueue_evict_inode()
547 info->attr.mq_msgsize); in mqueue_evict_inode()
570 struct mq_attr *attr = arg; in mqueue_create_attr() local
589 inode = mqueue_get_inode(dir->i_sb, ipc_ns, mode, attr); in mqueue_create_attr()
683 if (info->attr.mq_curmsgs) in mqueue_poll_file()
686 if (info->attr.mq_curmsgs < info->attr.mq_maxmsg) in mqueue_poll_file()
790 info->attr.mq_curmsgs == 1) { in __do_notify()
868 struct mq_attr *attr) in prepare_open() argument
881 mqueue_create_attr, attr); in prepare_open()
894 struct mq_attr *attr) in do_mq_open() argument
903 audit_mq_open(oflag, mode, attr); in do_mq_open()
920 error = prepare_open(path.dentry, oflag, ro, mode, name, attr); in do_mq_open()
945 struct mq_attr attr; in SYSCALL_DEFINE4() local
946 if (u_attr && copy_from_user(&attr, u_attr, sizeof(struct mq_attr))) in SYSCALL_DEFINE4()
949 return do_mq_open(u_name, oflag, mode, u_attr ? &attr : NULL); in SYSCALL_DEFINE4()
1104 if (unlikely(msg_len > info->attr.mq_msgsize)) { in do_mq_timedsend()
1138 if (info->attr.mq_curmsgs == info->attr.mq_maxmsg) { in do_mq_timedsend()
1220 if (unlikely(msg_len < info->attr.mq_msgsize)) { in do_mq_timedreceive()
1243 if (info->attr.mq_curmsgs == 0) { in do_mq_timedreceive()
1476 *old = info->attr; in do_mq_getsetattr()
1531 static inline int get_compat_mq_attr(struct mq_attr *attr, in get_compat_mq_attr() argument
1539 memset(attr, 0, sizeof(*attr)); in get_compat_mq_attr()
1540 attr->mq_flags = v.mq_flags; in get_compat_mq_attr()
1541 attr->mq_maxmsg = v.mq_maxmsg; in get_compat_mq_attr()
1542 attr->mq_msgsize = v.mq_msgsize; in get_compat_mq_attr()
1543 attr->mq_curmsgs = v.mq_curmsgs; in get_compat_mq_attr()
1547 static inline int put_compat_mq_attr(const struct mq_attr *attr, in put_compat_mq_attr() argument
1553 v.mq_flags = attr->mq_flags; in put_compat_mq_attr()
1554 v.mq_maxmsg = attr->mq_maxmsg; in put_compat_mq_attr()
1555 v.mq_msgsize = attr->mq_msgsize; in put_compat_mq_attr()
1556 v.mq_curmsgs = attr->mq_curmsgs; in put_compat_mq_attr()
1566 struct mq_attr attr, *p = NULL; in COMPAT_SYSCALL_DEFINE4() local
1568 p = &attr; in COMPAT_SYSCALL_DEFINE4()
1569 if (get_compat_mq_attr(&attr, u_attr)) in COMPAT_SYSCALL_DEFINE4()