LF OS
Hobby operating system for amd64 with high ambitions
Loading...
Searching...
No Matches
sd.c File Reference

(7c4d7d1 userspace/term: change eyecandy inclusion to use objcopy instead of xxd)

#include <sd.h>
#include <vm.h>
#include <mq.h>
#include <uuid.h>
#include <flexarray.h>
#include <string.h>
#include <log.h>
#include <errno.h>
#include <scheduler.h>
+ Include dependency graph for sd.c:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  sd_entry
 
struct  sd
 

Functions

void init_sd (void)
 
static struct sd_entrynew_sd_entry (uuid_t *uuid, mq_id_t queue)
 
uint64_t sd_register (uuid_t *uuid, mq_id_t svc_queue)
 
int64_t sd_send (uuid_t *uuid, struct Message *msg)
 

Variables

static struct sd sd_global_data
 

Data Structure Documentation

◆ sd_entry

struct sd_entry

Definition at line 11 of file sd.c.

+ Collaboration diagram for sd_entry:
Data Fields
struct sd_entry * next
struct sd_entry * prev
size_t push_idx
mq_id_t queues[(4080 - sizeof(uuid_t) - sizeof(size_t) -(sizeof(struct sd_entry *) *2))/sizeof(mq_id_t)]
uuid_t uuid

◆ sd

struct sd

Definition at line 23 of file sd.c.

+ Collaboration diagram for sd:
Data Fields
struct sd_entry * entry_shortcut[256]
struct sd_entry * head
struct sd_entry * tail

Function Documentation

◆ init_sd()

void init_sd ( void  )

Definition at line 32 of file sd.c.

References sd::entry_shortcut, memset(), and sd_global_data.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ new_sd_entry()

static struct sd_entry * new_sd_entry ( uuid_t uuid,
mq_id_t  queue 
)
static

Definition at line 36 of file sd.c.

References allocator::alloc, entry, kernel_alloc, memcpy(), memset(), queue, and sd_entry::uuid.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ sd_register()

uint64_t sd_register ( uuid_t uuid,
mq_id_t  svc_queue 
)

Definition at line 45 of file sd.c.

References ENOMEM, entry, sd::entry_shortcut, sd::head, logd, logw, new_sd_entry(), sd_entry::next, sd_entry::prev, scheduler_current_process, sd_global_data, sd::tail, sd_entry::uuid, uuid_cmp(), uuid_fmt(), and uuid_key().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ sd_send()

int64_t sd_send ( uuid_t uuid,
struct Message msg 
)

Definition at line 109 of file sd.c.

References ENOENT, entry, sd::entry_shortcut, mq_push(), sd_entry::next, sd_global_data, sd_entry::uuid, uuid_cmp(), and uuid_key().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Variable Documentation

◆ sd_global_data

struct sd sd_global_data
static

Definition at line 30 of file sd.c.