Implement streams IPC mechanism
All checks were successful
Build documentation / build-and-deploy (push) Successful in 3m47s
All checks were successful
Build documentation / build-and-deploy (push) Successful in 3m47s
This commit is contained in:
29
kernel/proc/stream.h
Normal file
29
kernel/proc/stream.h
Normal file
@@ -0,0 +1,29 @@
|
||||
#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
|
||||
Reference in New Issue
Block a user