| Function report | 
| Source Code: fs\locks.c | Create Date:2022-07-28 20:25:32 | 
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick | 
| home page | Tree | 
| Annotation kernel can get tool activity | Download SCCT | Chinese | 
Name:sys_flock: - flock() system call.*@fd: the file descriptor to lock.*@cmd: the type of lock to apply.* Apply a %FL_FLOCK style lock to an open file descriptor.* The @cmd can be one of:* - %LOCK_SH -- a shared lock.* - %LOCK_EX -- an exclusive lock.
Proto:SYSCALL_DEFINE2(flock, unsigned int, fd, unsigned int, cmd)
Type:
Parameter:Nothing
| 2203 | If Not unlock && Not (cmd & LOCK_MAND) && Not (f_mode & (le is open for reading | le is open for writing )) Then Go to out_putf | 
| 2213 | If can_sleep Then fl_flags |= A blocking lock | 
| 2216 | error = security_file_lock(file, fl_type) | 
| 2224 | Else error = locks_lock_file_wait(file, lock) | 
| 2227 | out_free : | 
| 2230 | out_putf : | 
| 2232 | out : | 
| 2233 | Return error | 
| 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 |