|
Voxia OS v0.0.1
Hobby Project Operating System Targeting x86-64
|
#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_dev * | find_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} |
| #define MAX_SNAPSHOT 64 |
Referenced by notify_call().
|
static |
Definition at line 12 of file notify.c.
References h, hash, name, name_len, NOTIFY_DEV_HASH_MASK, NOTIFY_DEV_HASH_SIZE, notify_table, spin_acquire(), spin_release(), strlen(), and strncmp().
Referenced by notify_call(), notify_register(), and wait_until_receive_notify().
| int notify_call | ( | char * | name, |
| uint32_t | event, | ||
| void * | data ) |
Definition at line 110 of file notify.c.
References notifier::callback, notifier::context, count, data, find_dev(), MAX_SNAPSHOT, name, notifier::next, notify_dev_put(), spin_acquire(), and spin_release().
Referenced by __attribute__(), ATAPIModule::identify(), and input_report_key().
| void notify_dev_create | ( | kstring | name | ) |
Definition at line 41 of file notify.c.
References flags, h, hash, irq_restore(), irq_save(), kalloc(), kfree2(), memset(), name, name_len, NOTIFY_DEV_HASH_MASK, NOTIFY_DEV_HASH_SIZE, notify_table, spin_acquire(), spin_release(), SPINLOCK_INIT, strlen(), and strncmp().
|
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().
| int notify_register | ( | char * | name, |
| struct notifier * | n ) |
Definition at line 78 of file notify.c.
References notifier::callback, notifier::context, find_dev(), notifier::flags, kalloc(), name, notify_dev_put(), notifier::priority, serial2_printf(), spin_acquire(), and spin_release().
| 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__().
|
static |
Definition at line 10 of file notify.c.
Referenced by find_dev(), and notify_dev_create().