PatchworkOS
Loading...
Searching...
No Matches
note.h
Go to the documentation of this file.
1#pragma once
2
3#include <kernel/config.h>
5#include <kernel/sync/lock.h>
6
7#include <sys/io.h>
8#include <sys/proc.h>
9
10typedef struct cpu cpu_t;
11
46#define NOTE_MAX_BUFFER 64
47
64
75
89
95void note_queue_init(note_queue_t* queue);
96
104
114
122
uint64_t note_queue_length(note_queue_t *queue)
Get the length of a note queue.
Definition note.c:31
uint64_t note_queue_write(note_queue_t *queue, const void *buffer, uint64_t count)
Write a note to a note queue.
Definition note.c:37
note_queue_flag_t
Note queue flags.
Definition note.h:53
#define NOTE_MAX_BUFFER
Maximum size of a notes buffer.
Definition note.h:46
void note_queue_init(note_queue_t *queue)
Initialize a note queue.
Definition note.c:22
void note_interrupt_handler(interrupt_frame_t *frame, cpu_t *self)
Note interrupt handler.
Definition note.c:77
@ NOTE_QUEUE_RECIEVED_KILL
Definition note.h:62
@ NOTE_QUEUE_NONE
Definition note.h:54
#define CONFIG_MAX_NOTES
Maximum note queue configuration.
Definition config.h:68
__UINT64_TYPE__ pid_t
Process Identifier.
Definition pid_t.h:11
EFI_PHYSICAL_ADDRESS buffer
Definition mem.c:15
static atomic_long count
Definition main.c:9
__UINT64_TYPE__ uint64_t
Definition stdint.h:17
__UINT8_TYPE__ uint8_t
Definition stdint.h:11
__UINT16_TYPE__ uint16_t
Definition stdint.h:13
CPU structure.
Definition cpu.h:42
Trap Frame Structure.
Definition interrupt.h:42
A simple ticket lock implementation.
Definition lock.h:43
Per-thread note queue.
Definition note.h:81
note_queue_flag_t flags
Definition note.h:86
uint64_t readIndex
Definition note.h:83
lock_t lock
Definition note.h:87
uint64_t writeIndex
Definition note.h:84
uint64_t length
Definition note.h:85
Note structure.
Definition note.h:70
pid_t sender
Definition note.h:73
uint16_t length
Definition note.h:72