summaryrefslogtreecommitdiffstats
path: root/fs/bcachefs/thread_with_file_types.h
blob: f4d484d44f63346e16fc1445aca4de8cd3cbb0df (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/* 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;
	bool			waiting_for_line;
};

struct stdio_redirect {
	struct stdio_buf	input;
	struct stdio_buf	output;
	bool			done;
};

#endif /* _BCACHEFS_THREAD_WITH_FILE_TYPES_H */