|
PatchworkOS
966e257
A non-POSIX operating system.
|
#include <kernel/fs/key.h>#include <kernel/cpu/syscall.h>#include <kernel/drivers/rand.h>#include <kernel/log/panic.h>#include <kernel/sched/clock.h>#include <kernel/sched/thread.h>#include <kernel/sched/timer.h>#include <kernel/sched/wait.h>#include <kernel/sync/rwlock.h>#include <errno.h>#include <kernel/utils/map.h>#include <stdlib.h>Go to the source code of this file.
Functions | |
| static key_t | key_generate (void) |
| static void | key_timer_handler (interrupt_frame_t *frame, cpu_t *self) |
| uint64_t | key_share (key_t *key, file_t *file, clock_t timeout) |
| Generates a key that can be used to retrieve the file within the specified timeout. | |
| SYSCALL_DEFINE (SYS_SHARE, uint64_t, key_t *key, fd_t fd, clock_t timeout) | |
| file_t * | key_claim (key_t *key) |
| Claims a shared file using the provided key. | |
| SYSCALL_DEFINE (SYS_CLAIM, fd_t, key_t *key) | |
Variables | |
| static map_t | keyMap = MAP_CREATE() |
| static list_t | keyList = LIST_CREATE(keyList) |
| static rwlock_t | keyLock = RWLOCK_CREATE() |
|
static |
|
static |
|
static |
|
static |
|
static |