2023-12-31 15:04:54 +00:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0 */
|
|
|
|
#ifndef _BCACHEFS_THREAD_WITH_FILE_TYPES_H
|
|
|
|
#define _BCACHEFS_THREAD_WITH_FILE_TYPES_H
|
|
|
|
|
2024-02-05 03:20:40 +00:00
|
|
|
#include "darray.h"
|
|
|
|
|
|
|
|
struct stdio_buf {
|
|
|
|
spinlock_t lock;
|
|
|
|
wait_queue_head_t wait;
|
|
|
|
darray_char buf;
|
|
|
|
};
|
|
|
|
|
2023-12-31 15:04:54 +00:00
|
|
|
struct stdio_redirect {
|
2024-02-05 03:20:40 +00:00
|
|
|
struct stdio_buf input;
|
|
|
|
struct stdio_buf output;
|
2023-12-31 15:04:54 +00:00
|
|
|
|
|
|
|
spinlock_t input_lock;
|
|
|
|
wait_queue_head_t input_wait;
|
2024-02-05 03:20:40 +00:00
|
|
|
darray_char input_buf;
|
2023-12-31 15:04:54 +00:00
|
|
|
bool done;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* _BCACHEFS_THREAD_WITH_FILE_TYPES_H */
|