Function report |
Source Code:ipc\mqueue.c |
Create Date:2022-07-28 16:51:53 |
Last Modify:2020-03-17 23:00:47 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:Notes: the case when user wants us to deregister (with NULL as pointer)* and he isn't currently owner of notification, will be silently discarded.* It isn't explicitly defined in the POSIX.
Proto:static int do_mq_notify(mqd_t mqdes, const struct sigevent *notification)
Type:int
Parameter:
Type | Parameter | Name |
---|---|---|
mqd_t | mqdes | |
const struct sigevent * | notification |
1225 | audit_mq_notify(mqdes, notification) |
1227 | nc = NULL |
1228 | sock = NULL |
1229 | If (notification != NULL) Then |
1230 | If Value for the false possibility is greater at compile time(sigev_notify != her notification: meaningless && sigev_notify != ify via signal && sigev_notify != deliver via thread creation ) Then Return -EINVAL |
1234 | If sigev_notify == ify via signal && Not Test if 'sig' is valid signal. Use this instead of testing _NSIG directly Then |
1236 | Return -EINVAL |
1238 | If sigev_notify == deliver via thread creation Then |
1242 | nc = allocate a network buffer |
1246 | If copy_from_user(data, sival_ptr, NOTIFY_COOKIE_LEN) Then |
1254 | add data to a buffer |
1256 | retry : |
1257 | f = fdget(sigev_signo) |
1258 | If Not file Then |
1262 | sock = grained unicast helpers: |
1269 | timeo = MAX_SCHEDULE_TIMEOUT |
1270 | ret = netlink_attachskb(sock, nc, & timeo, NULL) |
1271 | If ret == 1 Then |
1281 | If Not file Then |
1286 | inode = file_inode(file) |
1287 | If Value for the false possibility is greater at compile time(f_op != & mqueue_file_operations) Then |
1293 | ret = 0 |
1295 | If (notification == NULL) Then |
1296 | If notify_owner == task_tgid(current process) Then |
1297 | remove_notification(info) |
1298 | i_atime = i_ctime = current_time(inode) |
1300 | Else if (notify_owner != NULL) Then |
1302 | Else |
1304 | Case sigev_notify == her notification: meaningless |
1306 | Break |
1307 | Case sigev_notify == deliver via thread creation |
1314 | Case sigev_notify == ify via signal |
1315 | sigev_signo = sigev_signo |
1316 | sigev_value = sigev_value |
1317 | sigev_notify = ify via signal |
1318 | Break |
1321 | notify_owner = get_pid(task_tgid(current process)) |
1322 | notify_user_ns = get_user_ns(current_user_ns()) |
1323 | i_atime = i_ctime = current_time(inode) |
1325 | spin_unlock( & lock) |
1326 | out_fput : |
1328 | out : |
1329 | If sock Then netlink_detachskb(sock, nc) |
1331 | Else free_skb : |
1333 | dev_kfree_skb(nc) |
1335 | Return ret |
Name | Describe |
---|---|
SYSCALL_DEFINE2 | |
COMPAT_SYSCALL_DEFINE2 |
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 |