Function report | 
Source Code:block\ioprio.c | 
Create Date:2022-07-28 17:23:53 | 
| Last Modify:2020-03-17 23:21:05 | Copyright©Brick | 
| home page | Tree | 
| Annotation kernel can get tool activity | Download SCCT | Chinese | 
Name:SYSCALL_DEFINE2
Proto:SYSCALL_DEFINE2(ioprio_get, int, which, int, who)
Type:
Parameter:Nothing
| 197 | Case which == IOPRIO_WHO_PROCESS | 
| 198 | If Not who Then p = current process | 
| 200 | Else p = find_task_by_vpid(who) | 
| 202 | If p Then ret = get_task_ioprio(p) | 
| 204 | Break | 
| 205 | Case which == IOPRIO_WHO_PGRP | 
| 210 | Do | 
| 210 | typeof(({typeof(( * ((struct hlist_node * * )( & ( & (pgrp)-> lists of tasks that use this pid [PIDTYPE_PGID])->first))))________p1 = ({union{typeof(( * ((struct hlist_node * * )( & ( & (pgrp)-> lists of tasks that use this pid [PIDTYPE_PGID])->first))))__val;char __c[1];}__u;if (1)__read_once_size( & (( * ((struct hlist_node * * )( & ( & (pgrp)-> lists of tasks that use this pid [PIDTYPE_PGID])->first)))), __u.__c, sizeof(( * ((struct hlist_node * * )( & ( & (pgrp)-> lists of tasks that use this pid [PIDTYPE_PGID])->first)))));Else __read_once_size_nocheck( & (( * ((struct hlist_node * * )( & ( & (pgrp)-> lists of tasks that use this pid [PIDTYPE_PGID])->first)))), __u.__c, sizeof(( * ((struct hlist_node * * )( & ( & (pgrp)-> lists of tasks that use this pid [PIDTYPE_PGID])->first)))));Do{}while (0);__u.__val;});((typeof( * ( * ((struct hlist_node * * )( & ( & (pgrp)-> lists of tasks that use this pid [PIDTYPE_PGID])->first)))) * )(________p1));}))____ptr = (({ | 
| 210 | typeof(( * ((struct hlist_node * * )( & ( & (pgrp)-> lists of tasks that use this pid [PIDTYPE_PGID])->first))))________p1 = ({ | 
| 210 | union{typeof(( * ((structhlist_node * * )( & first)))) __val;char __c[1];}__u | 
| 210 | If 1 Then __read_once_size( & (( * ((structhlist_node * * )( & first)))), __c, size of *first ) | 
| 210 | Else __read_once_size_nocheck( & (( * ((structhlist_node * * )( & first)))), __c, size of *first ) | 
| 210 | Do | 
| 210 | When 0 cycle | 
| 210 | __val | 
| 210 | }) | 
| 210 | })) | 
| 210 | ____ptr ? ({ | 
| 210 | }) : NULL | 
| 210 | typeof(({typeof(( * ((struct hlist_node * * )( & ( & ((p))->pid_links[PIDTYPE_PGID])->next))))________p1 = ({union{typeof(( * ((struct hlist_node * * )( & ( & ((p))->pid_links[PIDTYPE_PGID])->next))))__val;char __c[1];}__u;if (1)__read_once_size( & (( * ((struct hlist_node * * )( & ( & ((p))->pid_links[PIDTYPE_PGID])->next)))), __u.__c, sizeof(( * ((struct hlist_node * * )( & ( & ((p))->pid_links[PIDTYPE_PGID])->next)))));Else __read_once_size_nocheck( & (( * ((struct hlist_node * * )( & ( & ((p))->pid_links[PIDTYPE_PGID])->next)))), __u.__c, sizeof(( * ((struct hlist_node * * )( & ( & ((p))->pid_links[PIDTYPE_PGID])->next)))));Do{}while (0);__u.__val;});((typeof( * ( * ((struct hlist_node * * )( & ( & ((p))->pid_links[PIDTYPE_PGID])->next)))) * )(________p1));}))____ptr = (({ | 
| 210 | typeof(( * ((struct hlist_node * * )( & ( & ((p))->pid_links[PIDTYPE_PGID])->next))))________p1 = ({ | 
| 210 | union{typeof(( * ((structhlist_node * * )( & next)))) __val;char __c[1];}__u | 
| 210 | If 1 Then __read_once_size( & (( * ((structhlist_node * * )( & next)))), __c, size of *next ) | 
| 210 | Else __read_once_size_nocheck( & (( * ((structhlist_node * * )( & next)))), __c, size of *next ) | 
| 210 | Do | 
| 210 | When 0 cycle | 
| 210 | __val | 
| 210 | }) | 
| 210 | })) | 
| 210 | ____ptr ? ({ | 
| 210 | }) : NULL | 
| 210 | })) | 
| 210 | void * __mptr = (void * )(({ | 
| 210 | If 1 Then __read_once_size( & (next), __c, size of next ) | 
| 210 | Else __read_once_size_nocheck( & (next), __c, size of next ) | 
| 210 | Do | 
| 210 | When 0 cycle | 
| 210 | __val | 
| 210 | })) | 
| 210 | Do | 
| 210 | When 0 cycle | 
| 210 | __mptr - __builtin_offsetof(typeof( * p), thread_node) | 
| 210 | cycle (({}), p = ({}); & p->thread_node != ( & ((tg___)->signal)->thread_head);p = ({ | 
| 210 | void * __mptr = (void * )(({ | 
| 210 | If 1 Then __read_once_size( & (next), __c, size of next ) | 
| 210 | Else __read_once_size_nocheck( & (next), __c, size of next ) | 
| 210 | Do | 
| 210 | When 0 cycle | 
| 210 | __val | 
| 210 | })) | 
| 210 | Do | 
| 210 | When 0 cycle | 
| 210 | __mptr - __builtin_offsetof(typeof( * p), thread_node) | 
| 210 | })) | 
| 218 | If PIDTYPE_PGID == PIDTYPE_PID Then Break | 
| 218 | When 0 cycle | 
| 219 | Break | 
| 220 | Case which == IOPRIO_WHO_USER | 
| 222 | If Not who Then user = current_user() | 
| 224 | Else user = Locate the user_struct for the passed UID. If found, take a ref on it. The* caller must undo that ref with free_uid().* If the user_struct could not be found, return NULL. | 
| 227 | If Not user Then Break | 
| 234 | tmpio = get_task_ioprio(p) | 
| 235 | If tmpio < 0 Then Continue | 
| 239 | Else ret = ioprio_best(ret, tmpio) | 
| 245 | Break | 
| 246 | Default | 
| 251 | Return ret | 
| 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  |