mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-27 04:47:05 +00:00
60e1baa872
- eliminate the dependency on printbufs, so that we can lift thread_with_file for use in xfs - add a nonblocking parameter to stdio_redirect_printf(), and either block if the buffer is full or drop it on the floor - don't buffer infinitely Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
23 lines
456 B
C
23 lines
456 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
#ifndef _BCACHEFS_THREAD_WITH_FILE_TYPES_H
|
|
#define _BCACHEFS_THREAD_WITH_FILE_TYPES_H
|
|
|
|
#include "darray.h"
|
|
|
|
struct stdio_buf {
|
|
spinlock_t lock;
|
|
wait_queue_head_t wait;
|
|
darray_char buf;
|
|
};
|
|
|
|
struct stdio_redirect {
|
|
struct stdio_buf input;
|
|
struct stdio_buf output;
|
|
|
|
spinlock_t input_lock;
|
|
wait_queue_head_t input_wait;
|
|
darray_char input_buf;
|
|
bool done;
|
|
};
|
|
|
|
#endif /* _BCACHEFS_THREAD_WITH_FILE_TYPES_H */
|