14 if (aLength != bLength)
19 return memcmp(a, b, aLength) == 0;
#define assert(expression)
uint64_t note_queue_length(note_queue_t *queue)
Get the length of a note queue.
uint64_t note_queue_write(note_queue_t *queue, const void *buffer, uint64_t count)
Write a note to a note queue.
#define NOTE_MAX_BUFFER
Maximum size of a notes buffer.
void note_queue_init(note_queue_t *queue)
Initialize a note queue.
void note_interrupt_handler(interrupt_frame_t *frame, cpu_t *self)
Note interrupt handler.
@ NOTE_QUEUE_RECIEVED_KILL
#define LOG_WARN(format,...)
void process_kill(process_t *process, uint64_t status)
Kills a process.
process_t * sched_process(void)
Retrieves the process of the currently running thread.
thread_t * sched_thread_unsafe(void)
Retrieves the currently running thread without disabling interrupts.
void sched_invoke(interrupt_frame_t *frame, cpu_t *self, schedule_flags_t flags)
The main scheduling function.
@ SCHED_DIE
Kill and free the currently running thread.
static void lock_init(lock_t *lock)
Initializes a lock.
#define LOCK_SCOPE(lock)
Acquires a lock for the reminder of the current scope.
static void lock_release(lock_t *lock)
Releases a lock.
static void lock_acquire(lock_t *lock)
Acquires a lock, blocking until it is available.
#define CONFIG_MAX_NOTES
Maximum note queue configuration.
#define EINVAL
Invalid argument.
#define errno
Error number variable.
#define NULL
Pointer error value.
#define ERR
Integer error value.
EFI_PHYSICAL_ADDRESS buffer
static bool note_queue_compare_buffers(const void *a, uint64_t aLength, const void *b, uint64_t bLength)
_PUBLIC int memcmp(const void *s1, const void *s2, size_t n)
_PUBLIC void * memcpy(void *_RESTRICT s1, const void *_RESTRICT s2, size_t n)
note_t notes[CONFIG_MAX_NOTES]
uint8_t buffer[NOTE_MAX_BUFFER]
Thread of execution structure.
process_t * process
The parent process that the thread executes within.
tid_t id
The thread id, unique within a process_t.