5#include <sys/spinlock.h>
92 for (i = 0; i < (n - 1); i++)
156 for (i = 0; i <
len; i++)
174 while (
len > nbytes) {
176 Copy_In(b + nbytes, &kbuf, chunksz);
179 for (i = 0; i < chunksz; i++)
202 Handle *handle = Handle_Alloc();
void Console_Gets(char *str, size_t n)
void Console_Puts(const char *str)
int Console_Close(Handle *handle)
void Console_Putc(char ch)
int Console_Write(Handle *handle, void *buf, uint64_t off, uint64_t len)
void Console_EnqueueKey(char key)
int Console_Read(Handle *handle, void *buf, uint64_t off, uint64_t len)
int Console_Flush(Handle *handle)
Handle * Console_OpenHandle()
char keyBuf[CONSOLE_KEYBUF_MAXLEN]
#define CONSOLE_KEYBUF_MAXLEN
void DebugConsole_Puts(const char *str)
void DebugConsole_Putc(short c)
int Copy_In(uintptr_t fromuser, void *tokernel, uintptr_t len)
int Copy_Out(void *fromkernel, uintptr_t touser, uintptr_t len)
void Serial_LateInit(void)
void Serial_Putc(char ch)
void Serial_Puts(const char *str)
void Spinlock_Unlock(Spinlock *lock) __UNLOCK_EX(*lock)
#define SPINLOCK_TYPE_NORMAL
void Spinlock_Lock(Spinlock *lock) __LOCK_EX(*lock)
void Spinlock_Init(Spinlock *lock, const char *name, uint64_t type)
int(* write)(Handle *, void *, uint64_t, uint64_t)
int(* read)(Handle *, void *, uint64_t, uint64_t)
void VGA_Puts(const char *str)