Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:ipc\mqueue.c Create Date:2022-07-28 16:52:00
Last Modify:2020-03-17 23:00:47 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:do_mq_getsetattr

Proto:static int do_mq_getsetattr(int mqdes, struct mq_attr *new, struct mq_attr *old)

Type:int

Parameter:

TypeParameterName
intmqdes
struct mq_attr *new
struct mq_attr *old
1356  If new && message queue flags & ~O_NONBLOCK Then Return -EINVAL
1359  f = fdget(mqdes)
1360  If Not file Then Return -EBADF
1363  If Value for the false possibility is greater at compile time(f_op != & mqueue_file_operations) Then
1364  fdput(f)
1365  Return -EBADF
1368  inode = file_inode(file)
1369  info = MQUEUE_I(inode)
1371  spin_lock( & lock)
1373  If old Then
1374  old = attr
1375  message queue flags = f_flags & O_NONBLOCK
1377  If new Then
1378  audit_mq_getsetattr(mqdes, new)
1379  spin_lock( & * Protects f_ep_links, f_flags. * Must not be taken from IRQ context.)
1380  If message queue flags & O_NONBLOCK Then f_flags |= O_NONBLOCK
1382  Else f_flags &= ~O_NONBLOCK
1384  spin_unlock( & * Protects f_ep_links, f_flags. * Must not be taken from IRQ context.)
1386  i_atime = i_ctime = current_time(inode)
1389  spin_unlock( & lock)
1390  fdput(f)
1391  Return 0
Caller
NameDescribe
SYSCALL_DEFINE3
COMPAT_SYSCALL_DEFINE3