mirror of
https://github.com/apache/nuttx.git
synced 2026-05-28 20:08:15 +08:00
libc/stdio: Add stdio file locking functions
Add flockfile(), ftrylockfile() and funlockfile() functions [1].
[1] POSIX.1-2008 / System Interfaces / flockfile
https://pubs.opengroup.org/onlinepubs/9699919799.2008edition/functions/flockfile.html
Signed-off-by: Miguel Herranz <miguel@midokura.com>
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
committed by
Xiang Xiao
parent
19d1e08717
commit
819ebe7356
@@ -268,6 +268,7 @@ Standard I/O
|
||||
int fgetc(FAR FILE *stream);
|
||||
int fgetpos(FAR FILE *stream, FAR fpos_t *pos);
|
||||
FAR char *fgets(FAR char *s, int n, FAR FILE *stream);
|
||||
void flockfile(FAR FILE *stream);
|
||||
FAR FILE *fopen(FAR const char *path, FAR const char *type);
|
||||
int fprintf(FAR FILE *stream, FAR const char *format, ...);
|
||||
int fputc(int c, FAR FILE *stream);
|
||||
@@ -278,6 +279,8 @@ Standard I/O
|
||||
int fseek(FAR FILE *stream, long int offset, int whence);
|
||||
int fsetpos(FAR FILE *stream, FAR fpos_t *pos);
|
||||
long ftell(FAR FILE *stream);
|
||||
int ftrylockfile(FAR FILE *stream);
|
||||
void funlockfile(FAR FILE *stream);
|
||||
size_t fwrite(FAR const void *ptr, size_t size, size_t n_items, FAR FILE *stream);
|
||||
FAR char *gets(FAR char *s);
|
||||
FAR char *gets_s(FAR char *s, rsize_t n);
|
||||
|
||||
Reference in New Issue
Block a user