Voxia OS v0.0.1
Hobby Project Operating System Targeting x86-64
Loading...
Searching...
No Matches
notify.c File Reference
#include "hal/acpi/hpet.h"
#include "hal/cpu/irq_lock.h"
#include "hal/timer/timer.h"
#include "hash.h"
#include "libk/serial.h"
#include <notify.h>
#include <spinlock.h>
#include <str.h>

Go to the source code of this file.

Macros

#define MAX_SNAPSHOT   64
 

Functions

static struct notify_devfind_dev (const char *name)
 
static void notify_dev_put (struct notify_dev *dev)
 
void notify_dev_create (kstring name)
 
int notify_register (char *name, struct notifier *n)
 
int notify_call (char *name, uint32_t event, void *data)
 
int wait_until_receive_notify (const char *name, uint64_t timeout)
 

Variables

static struct notify_dev_table notify_table = {0}
 

Macro Definition Documentation

◆ MAX_SNAPSHOT

#define MAX_SNAPSHOT   64

Referenced by notify_call().

Function Documentation

◆ find_dev()

static struct notify_dev * find_dev ( const char * name)
static

◆ notify_call()

int notify_call ( char * name,
uint32_t event,
void * data )

◆ notify_dev_create()

◆ notify_dev_put()

static void notify_dev_put ( struct notify_dev * dev)
static

Definition at line 32 of file notify.c.

References atomic_t::counter, kfree2(), and notify_dev::refcount.

Referenced by notify_call(), notify_register(), and wait_until_receive_notify().

◆ notify_register()

int notify_register ( char * name,
struct notifier * n )

◆ wait_until_receive_notify()

int wait_until_receive_notify ( const char * name,
uint64_t timeout )

Definition at line 140 of file notify.c.

References notify_dev::event_received, find_dev(), ms2ns, name, notify_dev_put(), and usleep().

Referenced by __attribute__().

Variable Documentation

◆ notify_table

struct notify_dev_table notify_table = {0}
static

Definition at line 10 of file notify.c.

Referenced by find_dev(), and notify_dev_create().