Function report |
Source Code:kernel\sys.c |
Create Date:2022-07-28 09:20:46 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:make sure you are allowed to change @tsk limits before calling this
Proto:int do_prlimit(struct task_struct *tsk, unsigned int resource, struct rlimit *new_rlim, struct rlimit *old_rlim)
Type:int
Parameter:
| Type | Parameter | Name |
|---|---|---|
| struct task_struct * | tsk | |
| unsigned int | resource | |
| struct rlimit * | new_rlim | |
| struct rlimit * | old_rlim |
| 1533 | retval = 0 |
| 1535 | If resource >= RLIM_NLIMITS Then Return -EINVAL |
| 1537 | If new_rlim Then |
| 1540 | If resource == RLIMIT_NOFILE && rlim_max > sysctl_nr_open Then Return -EPERM |
| 1546 | read_lock( & tasklist_lock) |
| 1547 | If Not sighand Then |
| 1554 | If new_rlim Then |
| 1557 | If rlim_max > rlim_max && Not Check operation authority Then retval = -EPERM |
| 1563 | If Not retval Then |
| 1569 | task_unlock(group_leader) |
| 1576 | If Not retval && new_rlim && resource == RLIMIT_CPU && rlim_cur != RLIM_INFINITY && IS_ENABLED(CONFIG_FOO) evaluates to 1 if CONFIG_FOO is set to 'y' or 'm',* 0 otherwise.(CONFIG_POSIX_TIMERS) Then update_rlimit_cpu(tsk, rlim_cur) |
| 1580 | out : |
| 1581 | read_unlock( & tasklist_lock) |
| 1582 | Return retval |
| Name | Describe |
|---|---|
| SYSCALL_DEFINE2 | |
| COMPAT_SYSCALL_DEFINE2 | |
| COMPAT_SYSCALL_DEFINE2 | |
| SYSCALL_DEFINE4 | |
| 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 |