Function report |
Source Code:ipc\msg.c |
Create Date:2022-07-28 16:42:16 |
| Last Modify:2020-03-17 22:56:56 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:do_msgsnd
Proto:static long do_msgsnd(int msqid, long mtype, void __user *mtext, size_t msgsz, int msgflg)
Type:long
Parameter:
| Type | Parameter | Name |
|---|---|---|
| int | msqid | |
| long | mtype | |
| void __user * | mtext | |
| size_t | msgsz | |
| int | msgflg |
| 828 | If msgsz > msg_ctlmax || msgsz < 0 || msqid < 0 Then Return -EINVAL |
| 838 | message text size = msgsz |
| 841 | msq = msq_obtain_object_check(ns, msqid) |
| 844 | Go to out_unlock1 |
| 847 | ipc_lock_object( & q_perm) |
| 849 | cycle |
| 859 | Go to out_unlock0 |
| 862 | err = security_msg_queue_msgsnd( & q_perm, msg, msgflg) |
| 863 | If err Then Go to out_unlock0 |
| 866 | If msg_fits_inqueue(msq, msgsz) Then Break |
| 870 | If msgflg & urn error on wait Then |
| 872 | Go to out_unlock0 |
| 878 | If Not ipc_rcu_getref( & q_perm) Then |
| 880 | Go to out_unlock0 |
| 883 | ipc_unlock_object( & q_perm) |
| 885 | schedule() |
| 888 | ipc_lock_object( & q_perm) |
| 890 | ipc_rcu_putref( & q_perm, msg_rcu_free) |
| 894 | Go to out_unlock0 |
| 898 | If signal_pending(current process) Then |
| 899 | err = -start if no handler.. |
| 900 | Go to out_unlock0 |
| 905 | ipc_update_pid( & pid of last msgsnd , task_tgid(current process)) |
| 908 | If Not pipelined_send(msq, msg, & wake_q) Then |
| 917 | err = 0 |
| 918 | msg = NULL |
| 920 | out_unlock0 : |
| 921 | ipc_unlock_object( & q_perm) |
| 923 | out_unlock1 : |
| 927 | Return err |
| Name | Describe |
|---|---|
| ksys_msgsnd | |
| compat_ksys_msgsnd |
| 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 |