All checks were successful
Build documentation / build-and-deploy (push) Successful in 3m47s
30 lines
816 B
C
30 lines
816 B
C
#ifndef _KERNEL_PROC_STREAM_H
|
|
#define _KERNEL_PROC_STREAM_H
|
|
|
|
#include <libk/list.h>
|
|
#include <libk/ringbuffer.h>
|
|
#include <libk/std.h>
|
|
#include <proc/suspension_q.h>
|
|
|
|
#define PROC_STREAM_MAX (1024 * 1024)
|
|
|
|
struct proc;
|
|
struct proc_resource;
|
|
struct cpu;
|
|
struct reschedule_ctx;
|
|
|
|
struct proc_stream {
|
|
struct proc_resource* resource;
|
|
struct ringbuffer ringbuffer;
|
|
};
|
|
|
|
void proc_cleanup_resource_stream (struct proc_resource* resource, struct reschedule_ctx* rctx);
|
|
|
|
void proc_stream_write (struct proc* proc, struct proc_stream* stream, struct reschedule_ctx* rctx,
|
|
void* data, size_t data_size);
|
|
|
|
size_t proc_stream_read (struct proc* proc, struct proc_stream* stream, struct reschedule_ctx* rctx,
|
|
void* out_data, size_t data_size);
|
|
|
|
#endif // _KERNEL_PROC_STREAM_H
|