mirror of
https://github.com/plctlab/riscv-operating-system-mooc.git
synced 2025-11-16 12:34:47 +00:00
23 lines
391 B
C
23 lines
391 B
C
#ifndef __OS_H__
|
|
#define __OS_H__
|
|
|
|
#include "types.h"
|
|
#include "platform.h"
|
|
|
|
#include <stddef.h>
|
|
#include <stdarg.h>
|
|
|
|
/* uart */
|
|
extern int uart_putc(char ch);
|
|
extern void uart_puts(char *s);
|
|
|
|
/* printf */
|
|
extern int printf(const char* s, ...);
|
|
extern void panic(char *s);
|
|
|
|
/* memory management */
|
|
extern void *page_alloc(int npages);
|
|
extern void page_free(void *p);
|
|
|
|
#endif /* __OS_H__ */
|