diff options
author | Alex Auvolat <alex.auvolat@ens.fr> | 2015-03-08 13:46:41 +0100 |
---|---|---|
committer | Alex Auvolat <alex.auvolat@ens.fr> | 2015-03-08 13:46:41 +0100 |
commit | 93af9a589980403f9887936963a6ce4f189dc020 (patch) | |
tree | c2e967e0d3b97ec6a6a3a6c0831e599ddca3f196 /src/kernel/include | |
parent | 5e3d036d3a10d919e54035b1365005f26886ed75 (diff) | |
download | kogata-93af9a589980403f9887936963a6ce4f189dc020.tar.gz kogata-93af9a589980403f9887936963a6ce4f189dc020.zip |
Channels.
Diffstat (limited to 'src/kernel/include')
-rw-r--r-- | src/kernel/include/ipc.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/kernel/include/ipc.h b/src/kernel/include/ipc.h new file mode 100644 index 0000000..5558120 --- /dev/null +++ b/src/kernel/include/ipc.h @@ -0,0 +1,21 @@ +#pragma once + +#include <token.h> +#include <vfs.h> + +// ---- Communication channels + +#define CHANNEL_BUFFER_SIZE 1000 // 1000 + other channel_t fields = 1024 - epsilon + +typedef struct { + fs_handle_t *a, *b; +} fs_handle_pair_t; + +fs_handle_pair_t make_channel(); + +// ---- Tokens for sharing file descriptors between processes + +token_t gen_token_for(fs_handle_t *h); +fs_handle_t *use_token(token_t tok); + +/* vim: set ts=4 sw=4 tw=0 noet :*/ |