#define MOS_ASSERT_X(cond, msg,...)
Console * console_get_by_prefix(const char *prefix)
static size_t console_io_read(io_t *io, void *data, size_t size)
void console_register(Console *con)
Console * console_get(const char *name)
static const io_op_t console_io_ops
std::array< Console *, 128 > console_list
static size_t console_io_write(io_t *io, const void *data, size_t size)
@ CONSOLE_CAP_READ
console supports read
bool signal_has_pending(void)
Return true if there's a pending signal.
long signal_send_to_thread(Thread *target, signal_t signal)
Send a signal to a thread.
MOSAPI s32 strncmp(const char *str1, const char *str2, size_t n)
MOSAPI s32 strcmp(const char *str1, const char *str2)
MOSAPI void list_node_append(list_node_t *head, list_node_t *item)
#define list_foreach(t, v, h)
Iterate over a list.
#define list_node(element)
Get the ‘list_node’ of a list element. This is exactly the reverse of ‘list_entry’ above.
list_node_t list_head
A linked list head.
MOSAPI bool list_is_empty(const list_node_t *head)
MOSAPI size_t ring_buffer_pos_pop_front(u8 *buffer, ring_buffer_pos_t *pos, u8 *buf, size_t size)
should_inline bool ring_buffer_pos_is_empty(ring_buffer_pos_t *pos)
MOSAPI void ring_buffer_pos_init(ring_buffer_pos_t *pos, size_t capacity)
should_inline size_t ring_buffer_pos_push_back_byte(u8 *buffer, ring_buffer_pos_t *pos, u8 data)
void io_init(io_t *io, io_type_t type, io_flags_t flags, const io_op_t *ops)
static size_t strlen(const char *s)
#define pr_emerg(fmt,...)
__nodiscard bool reschedule_for_waitlist(waitlist_t *waitlist)
#define spinlock_acquire(lock)
#define spinlock_release(lock)
virtual size_t do_write(const char *data, size_t size)=0
virtual bool extra_setup()
virtual bool set_color(standard_color_t fg, standard_color_t bg)=0
struct Console::@330233373312361211116347355025210137337367045127 reader
standard_color_t default_fg
struct Console::@320337056237367035102365240171133364340037030012 writer
standard_color_t default_bg
The entry in the waiters list of a process, or a thread.
Thread * thread_get(tid_t id)
#define container_of(ptr, type, member)
void waitlist_init(waitlist_t *list)
size_t waitlist_wake(waitlist_t *list, size_t max_wakeups)