Ignore:
Timestamp:
2025-04-17T16:01:16Z (5 days ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Branches:
master
Children:
888c06e
Parents:
1db4e2ae (diff), 250a435 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2025-04-17 15:51:11)
git-committer:
Jiří Zárevúcky <zarevucky.jiri@…> (2025-04-17 16:01:16)
Message:

Convert kernel console writing to byte arrays

More buffer per buffer (the original char32_t buffer takes up four
times as much space for the same amount of backlog, which is wasteful).
It is also faster, possibly thanks to bigger chunks being processed in bulk.
Gonna try to figure out if the locking can be improved further.

Also changed to use a syscall for reading KIO buffer from uspace,
to allow better synchronization.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/include/console/console.h

    r1db4e2ae rc4cfe4c  
    3636#define KERN_CONSOLE_H_
    3737
    38 #include <typedefs.h>
    39 #include <print.h>
    4038#include <console/chardev.h>
    4139#include <synch/spinlock.h>
     
    6664extern void kio_update(void *);
    6765extern void kio_flush(void);
    68 extern void kio_push_char(const char32_t);
    69 SPINLOCK_EXTERN(kio_lock);
     66extern void kio_push_bytes(const char *, size_t);
     67extern irq_spinlock_t kio_lock;
    7068
     69extern sysarg_t sys_kio_read(uspace_addr_t buf, size_t size, size_t at);
    7170extern sys_errno_t sys_kio(int cmd, uspace_addr_t buf, size_t size);
    7271
     
    7978extern void console_unlock(void);
    8079
     80extern void putstr(const char *s, size_t n);
     81
    8182#endif /* KERN_CONSOLE_H_ */
    8283
Note: See TracChangeset for help on using the changeset viewer.