|
PatchworkOS
966e257
A non-POSIX operating system.
|
Keys for sharing file descriptors between processes. More...
Keys for sharing file descriptors between processes.
Keys are used with the share() and claim() system calls to send files between processes.
Each key is a 64-bit one-time use randomly generated token that globally identifies a shared file.
Data Structures | |
| struct | key_entry_t |
| Key entry. More... | |
Functions | |
| 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. | |
| file_t * | key_claim (key_t *key) |
| Claims a shared file using the provided key. | |
Generates a key that can be used to retrieve the file within the specified timeout.
| key | Output pointer to store the generated key. |
| file | The file to share. |
| timeout | The time until the shared file expires. If CLOCKS_NEVER, it never expires. |
ERR and errno is set. Definition at line 62 of file key.c.
Claims a shared file using the provided key.
| key | Pointer to the key identifying the shared file. |
NULL and errno is set. Definition at line 142 of file key.c.