61 size_t ret = con->
ops->write(con, data,
size);
75 bool result = con->
ops->extra_setup(con);
127 size_t ret = con->
ops->write(con, data,
size);
138 con->
ops->get_color(con, &prev_fg, &prev_bg);
139 if (prev_fg != fg || prev_bg != bg)
140 con->
ops->set_color(con, fg, bg);
143 size_t ret = con->
ops->write(con, data,
size);
#define MOS_ASSERT_X(cond, msg,...)
size_t console_write_color(console_t *con, const char *data, size_t size, standard_color_t fg, standard_color_t bg)
static size_t console_io_read(io_t *io, void *data, size_t size)
console_t * console_get_by_prefix(const char *prefix)
void console_register(console_t *con)
size_t console_write(console_t *con, const char *data, size_t size)
static const io_op_t console_io_ops
static size_t console_io_write(io_t *io, const void *data, size_t size)
console_t * console_get(const char *name)
void console_putc(console_t *con, u8 c)
@ CONSOLE_CAP_READ
console supports read
@ CONSOLE_CAP_EXTRA_SETUP
extra setup required
long signal_send_to_thread(thread_t *target, signal_t signal)
Send a signal to a thread.
bool signal_has_pending(void)
Return true if there's a pending signal.
MOSAPI s32 strncmp(const char *str1, const char *str2, size_t n)
MOSAPI s32 strcmp(const char *str1, const char *str2)
#define LIST_HEAD_INIT(container)
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)
#define container_of(ptr, type, member)
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)
standard_color_t default_fg
struct console_t::@7 write
standard_color_t default_bg
struct console_t::@6 read
The entry in the waiters list of a process, or a thread.
thread_t * thread_get(tid_t id)
size_t waitlist_wake(waitlist_t *list, size_t max_wakeups)
__BEGIN_DECLS void waitlist_init(waitlist_t *list)