|
XenevaOS
|
#include <Ipc/auipc.h>#include <Fs/Dev/devhw.h>#include <Fs/Dev/devfs.h>#include <Fs/vfs.h>#include <Cred/group.h>#include <Mm/kmalloc.h>#include <Drivers/uart.h>#include <Hal/AA64/aa64lowlevel.h>#include <Hal/AA64/sched.h>#include <Serv/sysserv.h>#include <auipc.h>#include <string.h>#include <_null.h>
Classes | |
| struct | Endpoint |
| struct | Call |
Macros | |
| #define | MAX_EP 16 |
| #define | MAX_CALLS 32 |
| #define | EP_QUEUE 8 |
Enumerations | |
| enum | { CS_FREE = 0 , CS_QUEUED , CS_SERVING , CS_DONE , CS_FAILED , CS_ABANDONED } |
Functions | |
| void | AuIpcProcessGone (AuProcess *proc) |
| AuIpcProcessGone – a process is being reaped: tear down its endpoints (failing every call waiting on them) and cancel the calls it had in flight. | |
| void | AuIpcInitialize (void) |
| AuIpcInitialize – register /dev/ipc. | |
| int | AuIpcKCallBegin (const char *name, int pid, int uid, int gid, const void *req, uint32_t len, int32_t *call_id) |
| int | AuIpcKCallPoll (int32_t call_id, void *out, uint32_t cap, uint32_t *outlen, int32_t *server_status) |
| void | AuIpcKCallAbandon (int32_t call_id) |
| #define EP_QUEUE 8 |
| #define MAX_CALLS 32 |
| #define MAX_EP 16 |
auipc.c – generic kernel IPC (see BaseHdr/auipc.h).
All state lives in two small fixed tables guarded by masking interrupts: the kernel is single-CPU here and no operation here blocks while holding them. A sleeping operation checks its condition and goes to sleep with interrupts masked, so a wake-up cannot slip in between (same rule as /dev/hwdev IRQ_WAIT).
| void AuIpcInitialize | ( | void | ) |
AuIpcInitialize – register /dev/ipc.
| void AuIpcKCallAbandon | ( | int32_t | call_id | ) |
| int AuIpcKCallBegin | ( | const char * | name, |
| int | pid, | ||
| int | uid, | ||
| int | gid, | ||
| const void * | req, | ||
| uint32_t | len, | ||
| int32_t * | call_id | ||
| ) |
| int AuIpcKCallPoll | ( | int32_t | call_id, |
| void * | out, | ||
| uint32_t | cap, | ||
| uint32_t * | outlen, | ||
| int32_t * | server_status | ||
| ) |
| void AuIpcProcessGone | ( | AuProcess * | proc | ) |
AuIpcProcessGone – a process is being reaped: tear down its endpoints (failing every call waiting on them) and cancel the calls it had in flight.