xref: /linux/fs/bcachefs/thread_with_file_types.h (revision a1ff5a7d78a036d6c2178ee5acd6ba4946243800)
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef _BCACHEFS_THREAD_WITH_FILE_TYPES_H
3 #define _BCACHEFS_THREAD_WITH_FILE_TYPES_H
4 
5 #include "darray.h"
6 
7 struct stdio_buf {
8 	spinlock_t		lock;
9 	wait_queue_head_t	wait;
10 	darray_char		buf;
11 	bool			waiting_for_line;
12 };
13 
14 struct stdio_redirect {
15 	struct stdio_buf	input;
16 	struct stdio_buf	output;
17 	bool			done;
18 };
19 
20 #endif /* _BCACHEFS_THREAD_WITH_FILE_TYPES_H */
21