summaryrefslogtreecommitdiff
path: root/include/linux/thread_with_file_types.h
blob: 98d0ad1253221605542f575832f1210514e7bbfe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef _LINUX_THREAD_WITH_FILE_TYPES_H
#define _LINUX_THREAD_WITH_FILE_TYPES_H

#include <linux/darray_types.h>
#include <linux/spinlock_types.h>
#include <linux/wait.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 /* _LINUX_THREAD_WITH_FILE_TYPES_H */