...
The file module has functions lock files across several operations that are almost exact equivalents to POSIX API functions (see Listing - File Module Function and Listing - POSIX API Equivalent); the primary difference is the advantage of valuable return error codes to the application.
...
Code Block |
---|
...
|
...
rowspan | 7 |
---|
...
|
...
|
...
| |
void FSFile_LockGet (FS_FILE *p_file, |
...
FS_ERR *p_err); |
...
void FSFile_LockAccept (FS_FILE *p_file, |
...
FS_ERR *p_err); |
...
void FSFile_LockSet (FS_FILE *p_file, |
...
FS_ERR *p_err); |
...
Code Block |
---|
...
|
...
|
...
|
...
|
...
| |
void fs_flockfile (FS_FILE *file); |
...
int fs_ftrylockfile (FS_FILE *file); |
...
void fs_funlockfile (FS_FILE *file); |
...
For more information about and an example of using file locking, see
...
...