Scheduler optimization, console optimization (still slow as hell)
This commit is contained in:
@@ -1,5 +1,16 @@
|
||||
#pragma once
|
||||
#include "sys/types.h"
|
||||
|
||||
struct rtc_time {
|
||||
uint8_t second;
|
||||
uint8_t minute;
|
||||
uint8_t hour;
|
||||
uint8_t weekday;
|
||||
uint8_t day;
|
||||
uint8_t month;
|
||||
uint16_t year;
|
||||
};
|
||||
|
||||
void rtc_read(struct rtc_time *time);
|
||||
void rtc_set_century(uint8_t c);
|
||||
void rtc_init(void);
|
||||
|
||||
@@ -2,5 +2,8 @@
|
||||
|
||||
struct cpu_context;
|
||||
|
||||
extern uint64_t syscall_last_time;
|
||||
extern uint64_t syscall_count;
|
||||
|
||||
void amd64_syscall_init(void);
|
||||
extern void amd64_syscall_iretq(struct cpu_context *ctx);
|
||||
|
||||
+6
-6
@@ -16,12 +16,12 @@
|
||||
#define DEBUG_OUT_SERIAL 0
|
||||
#define DEBUG_OUT_DISP 1
|
||||
|
||||
#define kdebug(f, ...) debugf(DEBUG_DEFAULT, "[%s] " f, __func__, ##__VA_ARGS__)
|
||||
#define kinfo(f, ...) debugf(DEBUG_INFO, "[%s] " f, __func__, ##__VA_ARGS__)
|
||||
#define kwarn(f, ...) debugf(DEBUG_WARN, "[%s] " f, __func__, ##__VA_ARGS__)
|
||||
#define kerror(f, ...) debugf(DEBUG_ERROR, "[%s] " f, __func__, ##__VA_ARGS__)
|
||||
#define kfatal(f, ...) debugf(DEBUG_FATAL, "[%s] " f, __func__, ##__VA_ARGS__)
|
||||
#define kprint(l, f, ...) debugf(l, "[%s] " f, __func__, ##__VA_ARGS__)
|
||||
#define kdebug(f, ...) debugf(DEBUG_DEFAULT, "[%s] " f, __func__, ##__VA_ARGS__)
|
||||
#define kinfo(f, ...) debugf(DEBUG_INFO, "[%s] " f, __func__, ##__VA_ARGS__)
|
||||
#define kwarn(f, ...) debugf(DEBUG_WARN, "[%s] " f, __func__, ##__VA_ARGS__)
|
||||
#define kerror(f, ...) debugf(DEBUG_ERROR, "[%s] " f, __func__, ##__VA_ARGS__)
|
||||
#define kfatal(f, ...) debugf(DEBUG_FATAL, "[%s] " f, __func__, ##__VA_ARGS__)
|
||||
#define kprint(l, f, ...) debugf(l, "[%s] " f, __func__, ##__VA_ARGS__)
|
||||
|
||||
void fmtsiz(char *buf, size_t sz);
|
||||
|
||||
|
||||
+1
-1
@@ -14,5 +14,5 @@ struct ring {
|
||||
|
||||
size_t ring_avail(struct ring *b);
|
||||
ssize_t ring_read(struct thread *ctx, struct ring *b, void *buf, size_t lim);
|
||||
int ring_putc(struct ring *b, char c);
|
||||
int ring_putc(struct thread *ctx, struct ring *b, char c);
|
||||
void ring_init(struct ring *b, size_t cap);
|
||||
|
||||
@@ -9,10 +9,12 @@
|
||||
#define MIN(x, y) ((x) < (y) ? (x) : (y))
|
||||
|
||||
void *memcpy(void *restrict dst, const void *restrict src, size_t cnt);
|
||||
uint64_t *memcpyq(uint64_t *restrict dst, const uint64_t *restrict src, size_t cnt);
|
||||
void *memmove(void *dst, const void *src, size_t cnt);
|
||||
void *memset(void *dst, int v, size_t count);
|
||||
uint16_t *memsetw(uint16_t *dst, uint16_t v, size_t count);
|
||||
uint32_t *memsetl(uint32_t *dst, uint32_t v, size_t count);
|
||||
uint64_t *memsetq(uint64_t *dst, uint64_t v, size_t count);
|
||||
int memcmp(const void *a, const void *b, size_t count);
|
||||
|
||||
size_t strlen(const char *s);
|
||||
|
||||
Reference in New Issue
Block a user