mirror of
https://github.com/apache/nuttx.git
synced 2026-06-07 17:33:08 +08:00
setvbuf: Add support for disabling I/O buffering. Initially cut; untested.
This commit is contained in:
@@ -405,7 +405,7 @@ struct filelist
|
||||
struct file_struct
|
||||
{
|
||||
int fs_fd; /* File descriptor associated with stream */
|
||||
#if CONFIG_STDIO_BUFFER_SIZE > 0
|
||||
#ifndef CONFIG_STDIO_DISABLE_BUFFERING
|
||||
sem_t fs_sem; /* For thread safety */
|
||||
pid_t fs_holder; /* Holder of sem */
|
||||
int fs_counts; /* Number of times sem is held */
|
||||
|
||||
+5
-3
@@ -58,10 +58,12 @@
|
||||
|
||||
#define FILENAME_MAX _POSIX_NAME_MAX
|
||||
|
||||
/* The size of the I/O buffers */
|
||||
/* The (default) size of the I/O buffers */
|
||||
|
||||
#if CONFIG_STDIO_BUFFER_SIZE > 0
|
||||
# define BUFSIZ CONFIG_STDIO_BUFFER_SIZE
|
||||
#if defined(CONFIG_STDIO_BUFFER_SIZE) && CONFIG_STDIO_BUFFER_SIZE > 0
|
||||
# define BUFSIZ CONFIG_STDIO_BUFFER_SIZE
|
||||
#else
|
||||
# define BUFSIZ 64
|
||||
#endif
|
||||
|
||||
/* The following three definitions are for ANSI C, used by setvbuf */
|
||||
|
||||
Reference in New Issue
Block a user