Function report |
Source Code:ipc\mqueue.c |
Create Date:2022-07-28 16:50:24 |
| Last Modify:2020-03-17 23:00:47 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:mqueue_get_inode
Proto:static struct inode *mqueue_get_inode(struct super_block *sb, struct ipc_namespace *ipc_ns, umode_t mode, struct mq_attr *attr)
Type:struct inode
Parameter:
| Type | Parameter | Name |
|---|---|---|
| struct super_block * | sb | |
| struct ipc_namespace * | ipc_ns | |
| umode_t | mode | |
| struct mq_attr * | attr |
| 235 | u = current_user() |
| 239 | inode = obtain an inode |
| 245 | i_uid = current_fsuid() |
| 246 | i_gid = current_fsgid() |
| 247 | i_mtime = i_ctime = i_atime = current_time(inode) |
| 254 | i_size = FILENT_SIZE |
| 257 | Process spin lock initialization( & lock) |
| 258 | init_waitqueue_head( & wait_q) |
| 261 | notify_owner = NULL |
| 262 | notify_user_ns = NULL |
| 264 | user who created, for accounting = NULL |
| 265 | msg_tree = |
| 266 | msg_tree_rightmost = NULL |
| 267 | node_cache = NULL |
| 269 | maximum number of messages = min - return minimum of two values of the same or compatible types*@x: first value*@y: second value(mq_msg_max, mq_msg_default) |
| 271 | maximum message size = min - return minimum of two values of the same or compatible types*@x: first value*@y: second value(mq_msgsize_max, mq_msgsize_default) |
| 273 | If attr Then |
| 292 | If maximum number of messages <= 0 || maximum message size <= 0 Then Go to out_inode |
| 294 | If Check operation authority Then |
| 295 | If maximum number of messages > HARD_MSGMAX || maximum message size > HARD_MSGSIZEMAX Then Go to out_inode |
| 298 | Else |
| 299 | If maximum number of messages > mq_msg_max || maximum message size > mq_msgsize_max Then Go to out_inode |
| 305 | If maximum message size > ULONG_MAX / maximum number of messages Then Go to out_inode |
| 311 | If mq_bytes + mq_treesize < mq_bytes Then Go to out_inode |
| 313 | mq_bytes += mq_treesize |
| 323 | spin_unlock( & mq_lock) |
| 330 | i_size = 2 * DIRENT_SIZE |
| 335 | Return inode |
| 336 | out_inode : |
| 337 | put an inode |
| 338 | err : |
| Name | Describe |
|---|---|
| mqueue_fill_super | |
| mqueue_create_attr |
| Source code conversion tool public plug-in interface | X |
|---|---|
| Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |