Function report |
Source Code:kernel\acct.c |
Create Date:2022-07-28 11:01:03 |
| Last Modify:2020-03-17 15:14:29 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:acct_on
Proto:static int acct_on(struct filename *pathname)
Type:int
Parameter:
| Type | Parameter | Name |
|---|---|---|
| struct filename * | pathname |
| 197 | ns = task_active_pid_ns(current process) |
| 202 | acct = kzalloc - allocate memory. The memory is set to zero.*@size: how many bytes of memory are required.*@flags: the type of memory to allocate (see kmalloc). |
| 207 | file = file_open_name(pathname, O_WRONLY | O_APPEND | O_LARGEFILE, 0) |
| 219 | If Not (f_mode & Has write method(s) ) Then |
| 224 | internal = mnt_clone_internal( & f_path) |
| 230 | err = __mnt_want_write(internal) |
| 231 | If err Then |
| 240 | atomic_long_set( & count, 1) |
| 241 | init_fs_pin( & pin, acct_pin_kill) |
| 245 | mutex_init - initialize the mutex*@mutex: the mutex to be initialized* Initialize the mutex to unlocked state.* It is not allowed to initialize an already locked mutex.( & lock) |
| 246 | INIT_WORK( & work, close_work) |
| 247 | init_completion( & done) |
| 248 | mutex_lock_nested( & lock, 1) |
| 249 | pin_insert( & pin, mnt) |
| 255 | __mnt_drop_write(mnt) |
| 257 | Return 0 |
| Name | Describe |
|---|---|
| SYSCALL_DEFINE1 | sys_acct - enable/disable process accounting*@name: file name for accounting records or NULL to shutdown accounting* Returns 0 for success or negative errno values for failure.* sys_acct() is the only system call needed to implement process* accounting |
| 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 |