63 if (this->fg !=
fg || this->bg !=
bg)
102 unlocker.discard(), locker.
discard();
SpinUnlocker UnlockTemporarily()
std::optional< Console * > console_get(mos::string_view name)
std::array< Console *, 128 > consoles
std::optional< Console * > console_get_by_prefix(mos::string_view prefix)
std::array< Console *, 128 > consoles
@ 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.
#define list_foreach(t, v, h)
Iterate over a list.
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)
should_inline size_t ring_buffer_pos_push_back_byte(u8 *buffer, ring_buffer_pos_t *pos, u8 data)
#define do_write(fd, buffer, size)
basic_string_view< char > string_view
mos::basic_string< char > string
#define pr_emerg(fmt,...)
__nodiscard bool reschedule_for_waitlist(waitlist_t *waitlist)
#define spinlock_acquire(lock)
#define spinlock_release(lock)
Console(mos::string_view name, ConsoleCapFlags caps, Buffer< buf_size > *readBuf, StandardColor fg, StandardColor bg)
const StandardColor default_bg
size_t WriteColored(const char *data, size_t size, StandardColor fg, StandardColor bg)
virtual mos::string name() const override
virtual bool set_color(StandardColor fg, StandardColor bg)=0
virtual size_t on_write(const void *, size_t) override
const StandardColor default_fg
struct Console::@330233373312361211116347355025210137337367045127 writer
const ConsoleCapFlags caps
virtual void on_closed() override
virtual size_t on_read(void *, size_t) override
size_t Write(const char *data, size_t size)
virtual size_t read(void *buf, size_t count) final
IO(IOFlags flags, io_type_t type)
The entry in the waiters list of a process, or a thread.
struct Console * printk_console
Thread * thread_get(tid_t id)
size_t waitlist_wake(waitlist_t *list, size_t max_wakeups)