XenevaOS
Loading...
Searching...
No Matches
Classes | Macros | Enumerations | Functions
auipc.c File Reference
#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>
Include dependency graph for auipc.c:

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)
 

Macro Definition Documentation

◆ EP_QUEUE

#define EP_QUEUE   8

◆ MAX_CALLS

#define MAX_CALLS   32

◆ MAX_EP

#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).

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
CS_FREE 
CS_QUEUED 
CS_SERVING 
CS_DONE 
CS_FAILED 
CS_ABANDONED 

Function Documentation

◆ AuIpcInitialize()

void AuIpcInitialize ( void  )

AuIpcInitialize – register /dev/ipc.

◆ AuIpcKCallAbandon()

void AuIpcKCallAbandon ( int32_t  call_id)

◆ AuIpcKCallBegin()

int AuIpcKCallBegin ( const char *  name,
int  pid,
int  uid,
int  gid,
const void *  req,
uint32_t  len,
int32_t *  call_id 
)

◆ AuIpcKCallPoll()

int AuIpcKCallPoll ( int32_t  call_id,
void *  out,
uint32_t  cap,
uint32_t *  outlen,
int32_t *  server_status 
)

◆ AuIpcProcessGone()

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.