Reorganize headers
This commit is contained in:
parent
a12cd64029
commit
1355502e6c
32
Makefile
32
Makefile
@ -50,10 +50,10 @@ cdrom/mod:
|
||||
|
||||
MODULES = $(patsubst modules/%.c,cdrom/mod/%.ko,$(wildcard modules/*.c))
|
||||
|
||||
HEADERS = $(shell find kernel/include/ -type f -name '*.h')
|
||||
HEADERS = $(shell find base/usr/include/kernel -type f -name '*.h')
|
||||
|
||||
cdrom/mod/%.ko: modules/%.c ${HEADERS} | cdrom/mod
|
||||
${KCC} -T modules/link.ld -I./kernel/include -nostdlib ${KCFLAGS} -c -o $@ $<
|
||||
${KCC} -T modules/link.ld -nostdlib ${KCFLAGS} -c -o $@ $<
|
||||
|
||||
modules: ${MODULES}
|
||||
|
||||
@ -61,7 +61,7 @@ kernel/%.o: kernel/%.S
|
||||
${KAS} ${ASFLAGS} $< -o $@
|
||||
|
||||
kernel/%.o: kernel/%.c ${HEADERS}
|
||||
${KCC} ${KCFLAGS} -nostdlib -g -I./kernel/include -c -o $@ $<
|
||||
${KCC} ${KCFLAGS} -nostdlib -g -c -o $@ $<
|
||||
|
||||
# Root Filesystem
|
||||
|
||||
@ -102,48 +102,48 @@ base/lib/ld.so: linker/linker.c base/lib/libc.a | dirs
|
||||
|
||||
# Shared Libraries
|
||||
|
||||
base/lib/libtoaru_graphics.so: lib/graphics.c lib/graphics.h
|
||||
base/lib/libtoaru_graphics.so: lib/graphics.c base/usr/include/toaru/graphics.h
|
||||
$(CC) -o $@ $(CFLAGS) -shared -fPIC $<
|
||||
|
||||
base/lib/libtoaru_list.so: lib/list.c lib/list.h
|
||||
base/lib/libtoaru_list.so: lib/list.c base/usr/include/toaru/list.h
|
||||
$(CC) -o $@ $(CFLAGS) -shared -fPIC $<
|
||||
|
||||
base/lib/libtoaru_tree.so: lib/tree.c lib/tree.h base/lib/libtoaru_list.so
|
||||
base/lib/libtoaru_tree.so: lib/tree.c base/usr/include/toaru/tree.h base/lib/libtoaru_list.so
|
||||
$(CC) -o $@ $(CFLAGS) -shared -fPIC $< -ltoaru_list
|
||||
|
||||
base/lib/libtoaru_hashmap.so: lib/hashmap.c lib/hashmap.h base/lib/libtoaru_list.so
|
||||
base/lib/libtoaru_hashmap.so: lib/hashmap.c base/usr/include/toaru/hashmap.h base/lib/libtoaru_list.so
|
||||
$(CC) -o $@ $(CFLAGS) -shared -fPIC $< -ltoaru_list
|
||||
|
||||
base/lib/libtoaru_kbd.so: lib/kbd.c lib/kbd.h
|
||||
base/lib/libtoaru_kbd.so: lib/kbd.c base/usr/include/toaru/kbd.h
|
||||
$(CC) -o $@ $(CFLAGS) -shared -fPIC $<
|
||||
|
||||
base/lib/libtoaru_pthread.so: lib/pthread.c lib/pthread.h
|
||||
base/lib/libtoaru_pthread.so: lib/pthread.c base/usr/include/toaru/pthread.h
|
||||
$(CC) -o $@ $(CFLAGS) -shared -fPIC $<
|
||||
|
||||
base/lib/libtoaru_pex.so: lib/pex.c lib/pex.h
|
||||
base/lib/libtoaru_pex.so: lib/pex.c base/usr/include/toaru/pex.h
|
||||
$(CC) -o $@ $(CFLAGS) -shared -fPIC $<
|
||||
|
||||
base/lib/libtoaru_dlfcn.so: lib/dlfcn.c
|
||||
$(CC) -o $@ $(CFLAGS) -shared -fPIC $<
|
||||
|
||||
base/lib/libtoaru_yutani.so: lib/yutani.c lib/yutani.h base/lib/libtoaru_graphics.so
|
||||
base/lib/libtoaru_yutani.so: lib/yutani.c base/usr/include/toaru/yutani.h base/lib/libtoaru_graphics.so
|
||||
$(CC) -o $@ $(CFLAGS) -shared -fPIC $< -ltoaru_graphics
|
||||
|
||||
base/lib/libtoaru_rline.so: lib/rline.c lib/rline.h base/lib/libtoaru_kbd.so
|
||||
base/lib/libtoaru_rline.so: lib/rline.c base/usr/include/toaru/rline.h base/lib/libtoaru_kbd.so
|
||||
$(CC) -o $@ $(CFLAGS) -shared -fPIC $< -ltoaru_kbd
|
||||
|
||||
base/lib/libtoaru_termemu.so: lib/termemu.c lib/termemu.h base/lib/libtoaru_graphics.so
|
||||
base/lib/libtoaru_termemu.so: lib/termemu.c base/usr/include/toaru/termemu.h base/lib/libtoaru_graphics.so
|
||||
$(CC) -o $@ $(CFLAGS) -shared -fPIC $< -ltoaru_graphics
|
||||
|
||||
base/lib/libtoaru_drawstring.so: lib/drawstring.c lib/drawstring.h base/lib/libtoaru_graphics.so
|
||||
base/lib/libtoaru_drawstring.so: lib/drawstring.c base/usr/include/toaru/drawstring.h base/lib/libtoaru_graphics.so
|
||||
$(CC) -o $@ $(CFLAGS) -shared -fPIC $< -ltoaru_graphics
|
||||
|
||||
base/lib/libtoaru_decorations.so: lib/decorations.c lib/decorations.h base/lib/libtoaru_graphics.so
|
||||
base/lib/libtoaru_decorations.so: lib/decorations.c base/usr/include/toaru/decorations.h base/lib/libtoaru_graphics.so
|
||||
$(CC) -o $@ $(CFLAGS) -shared -fPIC $< -ltoaru_graphics
|
||||
|
||||
# Decoration Themes
|
||||
|
||||
base/lib/libtoaru-decor-fancy.so: decors/decor-fancy.c lib/decorations.h base/lib/libtoaru_graphics.so base/lib/libtoaru_decorations.so base/lib/libtoaru_drawstring.so
|
||||
base/lib/libtoaru-decor-fancy.so: decors/decor-fancy.c base/usr/include/toaru/decorations.h base/lib/libtoaru_graphics.so base/lib/libtoaru_decorations.so base/lib/libtoaru_drawstring.so
|
||||
$(CC) -o $@ $(CFLAGS) -shared -fPIC $< -ltoaru_decorations -ltoaru_drawstring -ltoaru_graphics
|
||||
|
||||
# Init
|
||||
|
@ -2,9 +2,9 @@
|
||||
#include <unistd.h>
|
||||
#include <sys/utsname.h>
|
||||
|
||||
#include "lib/yutani.h"
|
||||
#include "lib/graphics.h"
|
||||
#include "lib/drawstring.h"
|
||||
#include <toaru/yutani.h>
|
||||
#include <toaru/graphics.h>
|
||||
#include <toaru/drawstring.h>
|
||||
|
||||
#define PANEL_HEIGHT 24
|
||||
|
||||
|
@ -31,7 +31,7 @@
|
||||
|
||||
#include <wchar.h>
|
||||
|
||||
#include "lib/utf8decode.h"
|
||||
#include <toaru/utf8decode.h>
|
||||
|
||||
#define BLOCK_SIZE 256
|
||||
#define ENTER_KEY '\n'
|
||||
|
@ -30,19 +30,19 @@
|
||||
#include <sys/stat.h>
|
||||
#include <sys/time.h>
|
||||
|
||||
#include "lib/graphics.h"
|
||||
#include "lib/pthread.h"
|
||||
#include "lib/mouse.h"
|
||||
#include "lib/kbd.h"
|
||||
#include "lib/pex.h"
|
||||
#include "lib/yutani.h"
|
||||
#include "lib/hashmap.h"
|
||||
#include "lib/list.h"
|
||||
#include "lib/spinlock.h"
|
||||
#include <toaru/graphics.h>
|
||||
#include <toaru/pthread.h>
|
||||
#include <toaru/mouse.h>
|
||||
#include <toaru/kbd.h>
|
||||
#include <toaru/pex.h>
|
||||
#include <toaru/yutani.h>
|
||||
#include <toaru/hashmap.h>
|
||||
#include <toaru/list.h>
|
||||
#include <toaru/spinlock.h>
|
||||
|
||||
#define _DEBUG_YUTANI
|
||||
#ifdef _DEBUG_YUTANI
|
||||
#include "lib/trace.h"
|
||||
#include <toaru/trace.h>
|
||||
#define TRACE_APP_NAME "yutani"
|
||||
#else
|
||||
#define TRACE(msg,...)
|
||||
|
@ -12,12 +12,12 @@
|
||||
#include <syscall.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "lib/yutani.h"
|
||||
#include "lib/graphics.h"
|
||||
#include "lib/pthread.h"
|
||||
#include <toaru/yutani.h>
|
||||
#include <toaru/graphics.h>
|
||||
#include <toaru/pthread.h>
|
||||
|
||||
#define TRACE_APP_NAME "drawlines"
|
||||
#include "lib/trace.h"
|
||||
#include <toaru/trace.h>
|
||||
|
||||
static int left, top, width, height;
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
#include <unistd.h>
|
||||
#include <syscall.h>
|
||||
|
||||
#include "lib/trace.h"
|
||||
#include <toaru/trace.h>
|
||||
#define TRACE_APP_NAME "font-server"
|
||||
|
||||
#define FONT_PATH "/usr/share/fonts/"
|
||||
|
@ -30,7 +30,7 @@
|
||||
//#include "lib/trace.h"
|
||||
#define TRACE(...)
|
||||
|
||||
#include "lib/list.h"
|
||||
#include <toaru/list.h>
|
||||
|
||||
#define MIN_COL_SPACING 2
|
||||
|
||||
|
@ -8,8 +8,8 @@
|
||||
#include <sys/stat.h>
|
||||
#include <sys/ioctl.h>
|
||||
|
||||
#include "lib/trace.h"
|
||||
#include "lib/hashmap.h"
|
||||
#include <toaru/trace.h>
|
||||
#include <toaru/hashmap.h>
|
||||
#define TRACE_APP_NAME "migrate"
|
||||
|
||||
#define CHUNK_SIZE 4096
|
||||
|
@ -20,7 +20,7 @@
|
||||
#include <dirent.h>
|
||||
#include <pwd.h>
|
||||
|
||||
#include "lib/list.h"
|
||||
#include <toaru/list.h>
|
||||
|
||||
#define LINE_LEN 4096
|
||||
|
||||
|
@ -19,8 +19,8 @@
|
||||
#include <unistd.h>
|
||||
#include <dirent.h>
|
||||
|
||||
#include "lib/list.h"
|
||||
#include "lib/tree.h"
|
||||
#include <toaru/list.h>
|
||||
#include <toaru/tree.h>
|
||||
|
||||
typedef struct process {
|
||||
int pid;
|
||||
|
@ -33,9 +33,9 @@
|
||||
|
||||
#include <_xlog.h>
|
||||
|
||||
#include "lib/list.h"
|
||||
#include "lib/kbd.h"
|
||||
#include "lib/rline.h"
|
||||
#include <toaru/list.h>
|
||||
#include <toaru/kbd.h>
|
||||
#include <toaru/rline.h>
|
||||
|
||||
#define PIPE_TOKEN "\xFF\xFFPIPE\xFF\xFF"
|
||||
#define STAR_TOKEN "\xFF\xFFSTAR\xFF\xFF"
|
||||
|
@ -12,8 +12,8 @@
|
||||
#include <unistd.h>
|
||||
#include <sys/utsname.h>
|
||||
|
||||
#include "lib/graphics.h"
|
||||
#include "lib/termemu.h"
|
||||
#include <toaru/graphics.h>
|
||||
#include <toaru/termemu.h>
|
||||
|
||||
#include "toaru_logo.h"
|
||||
|
||||
|
@ -24,10 +24,10 @@
|
||||
|
||||
#include <wchar.h>
|
||||
|
||||
#include "lib/utf8decode.h"
|
||||
#include "lib/kbd.h"
|
||||
#include "lib/graphics.h"
|
||||
#include "lib/termemu.h"
|
||||
#include <toaru/utf8decode.h>
|
||||
#include <toaru/kbd.h>
|
||||
#include <toaru/graphics.h>
|
||||
#include <toaru/termemu.h>
|
||||
|
||||
#include "vga-palette.h"
|
||||
|
||||
|
@ -34,17 +34,15 @@
|
||||
#include <wchar.h>
|
||||
|
||||
#define TRACE_APP_NAME "terminal"
|
||||
#include "lib/trace.h"
|
||||
|
||||
#include "lib/utf8decode.h"
|
||||
|
||||
#include "lib/yutani.h"
|
||||
#include "lib/decorations.h"
|
||||
#include "lib/graphics.h"
|
||||
#include "lib/kbd.h"
|
||||
#include "lib/termemu.h"
|
||||
#include "lib/spinlock.h"
|
||||
#include "lib/list.h"
|
||||
#include <toaru/trace.h>
|
||||
#include <toaru/utf8decode.h>
|
||||
#include <toaru/yutani.h>
|
||||
#include <toaru/decorations.h>
|
||||
#include <toaru/graphics.h>
|
||||
#include <toaru/kbd.h>
|
||||
#include <toaru/termemu.h>
|
||||
#include <toaru/spinlock.h>
|
||||
#include <toaru/list.h>
|
||||
|
||||
#include "terminal-palette.h"
|
||||
#include "terminal-font.h"
|
||||
|
@ -1,7 +1,7 @@
|
||||
#include <stdio.h>
|
||||
#include <getopt.h>
|
||||
|
||||
#include "lib/yutani.h"
|
||||
#include <toaru/yutani.h>
|
||||
|
||||
yutani_t * yctx;
|
||||
|
||||
|
@ -13,9 +13,9 @@
|
||||
#include <syscall.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "lib/yutani.h"
|
||||
#include "lib/graphics.h"
|
||||
#include "lib/pthread.h"
|
||||
#include <toaru/yutani.h>
|
||||
#include <toaru/graphics.h>
|
||||
#include <toaru/pthread.h>
|
||||
|
||||
static int left, top, width, height;
|
||||
|
||||
|
@ -1,10 +1,10 @@
|
||||
#pragma once
|
||||
|
||||
#include "lib/yutani.h"
|
||||
#include "lib/list.h"
|
||||
#include "lib/hashmap.h"
|
||||
#include "lib/graphics.h"
|
||||
#include "lib/kbd.h"
|
||||
#include <toaru/yutani.h>
|
||||
#include <toaru/list.h>
|
||||
#include <toaru/hashmap.h>
|
||||
#include <toaru/graphics.h>
|
||||
#include <toaru/kbd.h>
|
||||
|
||||
#define MOUSE_SCALE 3
|
||||
#define MOUSE_OFFSET_X 26
|
||||
|
@ -2,7 +2,7 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <system.h>
|
||||
#include <kernel/system.h>
|
||||
|
||||
typedef struct {
|
||||
unsigned char *data;
|
@ -8,7 +8,7 @@
|
||||
* information from that bootloader.
|
||||
*
|
||||
*/
|
||||
#include <system.h>
|
||||
#include <kernel/system.h>
|
||||
|
||||
/*
|
||||
* Multiboot
|
||||
@ -16,5 +16,5 @@
|
||||
* Also supported natively by QEMU and a few
|
||||
* other emulators.
|
||||
*/
|
||||
#include <multiboot.h>
|
||||
#include <kernel/multiboot.h>
|
||||
|
@ -11,7 +11,7 @@
|
||||
* require different header files for definitions
|
||||
*/
|
||||
#ifdef _KERNEL_
|
||||
# include <types.h>
|
||||
# include <kernel/types.h>
|
||||
#else
|
||||
# include <stdint.h>
|
||||
#endif
|
@ -3,10 +3,10 @@
|
||||
#pragma once
|
||||
|
||||
#ifdef _KERNEL_
|
||||
# include <types.h>
|
||||
# include <kernel/types.h>
|
||||
#else
|
||||
# ifdef BOOTLOADER
|
||||
# include <types.h>
|
||||
# include <kernel/types.h>
|
||||
# else
|
||||
# include <stdint.h>
|
||||
# endif
|
@ -1,10 +1,10 @@
|
||||
#pragma once
|
||||
|
||||
#include "list.h"
|
||||
|
||||
#ifdef _KERNEL_
|
||||
# include <system.h>
|
||||
# include <kernel/list.h>
|
||||
# include <kernel/system.h>
|
||||
#else
|
||||
# include <toaru/list.h>
|
||||
# include <string.h>
|
||||
# include <stddef.h>
|
||||
# include <stdlib.h>
|
@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include <system.h>
|
||||
#include <kernel/system.h>
|
||||
|
||||
struct ethernet_packet {
|
||||
uint8_t destination[6];
|
@ -5,7 +5,7 @@
|
||||
#pragma once
|
||||
|
||||
#ifdef _KERNEL_
|
||||
# include <types.h>
|
||||
# include <kernel/types.h>
|
||||
#else
|
||||
# include <stdint.h>
|
||||
# include <stddef.h>
|
@ -3,7 +3,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <types.h>
|
||||
#include <kernel/types.h>
|
||||
|
||||
extern uintptr_t heap_end;
|
||||
|
@ -1,7 +1,7 @@
|
||||
#ifndef KERNEL_MOD_SHELL_H
|
||||
#define KERNEL_MOD_SHELL_H
|
||||
|
||||
#include <fs.h>
|
||||
#include <kernel/fs.h>
|
||||
|
||||
/*
|
||||
* We're going to have a list of shell commands.
|
@ -4,9 +4,9 @@
|
||||
/* The format isn't really used for anything right now */
|
||||
#define SND_FORMAT_L16SLE 0 /* Linear 16-bit signed little endian */
|
||||
|
||||
#include <mod/sound.h>
|
||||
#include <logging.h>
|
||||
#include <system.h>
|
||||
#include <kernel/mod/sound.h>
|
||||
#include <kernel/logging.h>
|
||||
#include <kernel/system.h>
|
||||
|
||||
#define SND_KNOB_VENDOR 1024
|
||||
|
@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include "../../../include/stdint.h"
|
||||
#include <stdint.h>
|
||||
|
||||
#define SND_MAX_KNOBS 256
|
||||
#define SND_KNOB_NAME_SIZE 256
|
@ -1,6 +1,6 @@
|
||||
#ifndef _TMPFS_H__
|
||||
#define _TMPFS_H__
|
||||
#include <fs.h>
|
||||
#include <kernel/fs.h>
|
||||
|
||||
fs_node_t * tmpfs_create(char * name);
|
||||
|
@ -1,7 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <types.h>
|
||||
#include <hashmap.h>
|
||||
#include <kernel/types.h>
|
||||
#include <kernel/hashmap.h>
|
||||
|
||||
typedef struct {
|
||||
char * name;
|
@ -2,7 +2,7 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <system.h>
|
||||
#include <kernel/system.h>
|
||||
|
||||
#define MULTIBOOT_MAGIC 0x1BADB002
|
||||
#define MULTIBOOT_EAX_MAGIC 0x2BADB002
|
@ -5,7 +5,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <types.h>
|
||||
#include <kernel/types.h>
|
||||
|
||||
typedef struct _pipe_device {
|
||||
uint8_t * buffer;
|
@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include <fs.h>
|
||||
#include <kernel/fs.h>
|
||||
|
||||
extern size_t vasprintf(char * buf, const char *fmt, va_list args);
|
||||
extern int sprintf(char *buf, const char *fmt, ...);
|
@ -3,10 +3,9 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
//#include <system.h>
|
||||
#include <tree.h>
|
||||
#include <signal.h>
|
||||
#include <task.h>
|
||||
#include <kernel/tree.h>
|
||||
#include <kernel/signal.h>
|
||||
#include <kernel/task.h>
|
||||
|
||||
#define KERNEL_STACK_SIZE 0x8000
|
||||
|
@ -2,8 +2,8 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <system.h>
|
||||
#include <types.h>
|
||||
#include <kernel/system.h>
|
||||
#include <kernel/types.h>
|
||||
|
||||
#define SHM_PATH_SEPARATOR "."
|
||||
|
@ -3,9 +3,9 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <types.h>
|
||||
#include <kernel/types.h>
|
||||
void return_from_signal_handler(void);
|
||||
void fix_signal_stacks(void);
|
||||
|
||||
#include <signal_defs.h>
|
||||
#include <sys/signal_defs.h>
|
||||
|
@ -2,13 +2,13 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <types.h>
|
||||
#include <fs.h>
|
||||
#include <va_list.h>
|
||||
#include <list.h>
|
||||
#include <task.h>
|
||||
#include <process.h>
|
||||
#include <libc.h>
|
||||
#include <kernel/types.h>
|
||||
#include <kernel/fs.h>
|
||||
#include <kernel/va_list.h>
|
||||
#include <kernel/list.h>
|
||||
#include <kernel/task.h>
|
||||
#include <kernel/process.h>
|
||||
#include <kernel/libc.h>
|
||||
|
||||
#define ASSUME(cond) __extension__ ({ if (!(cond)) { __builtin_unreachable(); } })
|
||||
|
||||
@ -230,5 +230,5 @@ extern int send_signal(pid_t process, uint32_t signal);
|
||||
extern void validate(void * ptr);
|
||||
extern int validate_safe(void * ptr);
|
||||
|
||||
#include <errno_defs.h>
|
||||
#include <errno.h>
|
||||
|
@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include <types.h>
|
||||
#include <kernel/types.h>
|
||||
|
||||
typedef struct page {
|
||||
unsigned int present:1;
|
@ -4,7 +4,7 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "list.h"
|
||||
#include <kernel/list.h>
|
||||
|
||||
typedef struct tree_node {
|
||||
void * value;
|
@ -6,7 +6,7 @@
|
||||
|
||||
#define NULL ((void *)0UL)
|
||||
|
||||
#include "../../include/stdint.h"
|
||||
#include <stdint.h>
|
||||
|
||||
typedef unsigned long size_t;
|
||||
#define CHAR_BIT 8
|
@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include <types.h>
|
||||
#include <kernel/types.h>
|
||||
|
||||
struct TypeDescriptor {
|
||||
uint16_t type_kind;
|
@ -3,7 +3,7 @@
|
||||
#ifndef _KERNEL_
|
||||
#include <sys/types.h>
|
||||
#else
|
||||
#include <types.h>
|
||||
#include <kernel/types.h>
|
||||
#endif
|
||||
|
||||
/* Technically part of ioctl */
|
||||
|
@ -6,8 +6,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "graphics.h"
|
||||
#include "yutani.h"
|
||||
#include <toaru/graphics.h>
|
||||
#include <toaru/yutani.h>
|
||||
|
||||
extern uint32_t decor_top_height;
|
||||
extern uint32_t decor_bottom_height;
|
@ -1,5 +1,5 @@
|
||||
#pragma once
|
||||
#include "lib/graphics.h"
|
||||
#include <toaru/graphics.h>
|
||||
|
||||
void draw_string(gfx_context_t * ctx, int x, int y, uint32_t _fg, char * str);
|
||||
int draw_string_width(char * str);
|
@ -1,10 +1,11 @@
|
||||
#pragma once
|
||||
|
||||
#include "list.h"
|
||||
|
||||
#ifdef _KERNEL_
|
||||
# include <system.h>
|
||||
# include <kernel/list.h>
|
||||
# include <kernel/system.h>
|
||||
#else
|
||||
# include <toaru/list.h>
|
||||
# include <string.h>
|
||||
# include <stddef.h>
|
||||
# include <stdlib.h>
|
@ -5,7 +5,7 @@
|
||||
#pragma once
|
||||
|
||||
#ifdef _KERNEL_
|
||||
# include <types.h>
|
||||
# include <kernel/types.h>
|
||||
#else
|
||||
# include <stdint.h>
|
||||
# include <stddef.h>
|
@ -1,7 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#ifdef _KERNEL_
|
||||
# include <types.h>
|
||||
# include <kernel/types.h>
|
||||
#else
|
||||
# include <stdint.h>
|
||||
#endif
|
@ -4,7 +4,7 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "list.h"
|
||||
#include <toaru/list.h>
|
||||
|
||||
typedef struct tree_node {
|
||||
void * value;
|
@ -3,11 +3,11 @@
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "hashmap.h"
|
||||
#include "graphics.h"
|
||||
#include "kbd.h"
|
||||
#include "mouse.h"
|
||||
#include "list.h"
|
||||
#include <toaru/hashmap.h>
|
||||
#include <toaru/graphics.h>
|
||||
#include <toaru/kbd.h>
|
||||
#include <toaru/mouse.h>
|
||||
#include <toaru/list.h>
|
||||
|
||||
#define YUTANI_SHMKEY(server_ident,buf,sz,win) sprintf(buf, "sys.%s.%d", server_ident, win->bufid);
|
||||
#define YUTANI_SHMKEY_EXP(server_ident,buf,sz,bufid) sprintf(buf, "sys.%s.%d", server_ident, bufid);
|
@ -1,10 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#define IO_VID_WIDTH 0x5001
|
||||
#define IO_VID_HEIGHT 0x5002
|
||||
#define IO_VID_DEPTH 0x5003
|
||||
#define IO_VID_ADDR 0x5004
|
||||
#define IO_VID_SIGNAL 0x5005
|
||||
#define IO_VID_SET 0x5006
|
||||
#define IO_VID_STRIDE 0x5007
|
||||
|
@ -1,10 +1,9 @@
|
||||
#include <stdint.h>
|
||||
|
||||
#include "lib/yutani.h"
|
||||
#include "lib/graphics.h"
|
||||
//#include "lib/shmemfonts.h"
|
||||
#include "lib/decorations.h"
|
||||
#include "lib/drawstring.h"
|
||||
#include <toaru/yutani.h>
|
||||
#include <toaru/graphics.h>
|
||||
#include <toaru/decorations.h>
|
||||
#include <toaru/drawstring.h>
|
||||
|
||||
#define INACTIVE 9
|
||||
|
||||
|
@ -7,9 +7,9 @@
|
||||
* Global Descriptor Tables module
|
||||
*
|
||||
*/
|
||||
#include <system.h>
|
||||
#include <logging.h>
|
||||
#include <tss.h>
|
||||
#include <kernel/system.h>
|
||||
#include <kernel/logging.h>
|
||||
#include <kernel/tss.h>
|
||||
|
||||
typedef struct {
|
||||
/* Limits */
|
||||
|
@ -7,8 +7,8 @@
|
||||
* Interrupt Descriptor Tables
|
||||
*
|
||||
*/
|
||||
#include <system.h>
|
||||
#include <logging.h>
|
||||
#include <kernel/system.h>
|
||||
#include <kernel/logging.h>
|
||||
|
||||
typedef struct {
|
||||
uint16_t base_low;
|
||||
|
@ -7,10 +7,10 @@
|
||||
* Interrupt Requests
|
||||
*
|
||||
*/
|
||||
#include <system.h>
|
||||
#include <logging.h>
|
||||
#include <module.h>
|
||||
#include <printf.h>
|
||||
#include <kernel/system.h>
|
||||
#include <kernel/logging.h>
|
||||
#include <kernel/module.h>
|
||||
#include <kernel/printf.h>
|
||||
|
||||
/* Programmable interrupt controller */
|
||||
#define PIC1 0x20
|
||||
|
@ -6,10 +6,10 @@
|
||||
*
|
||||
* Interrupt Service Requests
|
||||
*/
|
||||
#include <system.h>
|
||||
#include <logging.h>
|
||||
#include <module.h>
|
||||
#include <printf.h>
|
||||
#include <kernel/system.h>
|
||||
#include <kernel/logging.h>
|
||||
#include <kernel/module.h>
|
||||
#include <kernel/printf.h>
|
||||
|
||||
/* The count is treated as is when setting up IDT gates. However there is an
|
||||
* additional ISR for the system call vector which is handled explicitly since
|
||||
|
@ -7,7 +7,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <system.h>
|
||||
#include <kernel/system.h>
|
||||
|
||||
/* CMOS values are stored like so:
|
||||
* Say it's 8:42 AM, then the values are stored as:
|
||||
|
@ -15,8 +15,8 @@
|
||||
* FPU states are per kernel thread.
|
||||
*
|
||||
*/
|
||||
#include <system.h>
|
||||
#include <logging.h>
|
||||
#include <kernel/system.h>
|
||||
#include <kernel/logging.h>
|
||||
|
||||
#define NO_LAZY_FPU
|
||||
|
||||
|
@ -6,9 +6,10 @@
|
||||
* ToAruOS PCI Initialization
|
||||
*/
|
||||
|
||||
#include <system.h>
|
||||
#include <pci.h>
|
||||
#include <pci_list.h>
|
||||
#include <kernel/system.h>
|
||||
#include <kernel/pci.h>
|
||||
|
||||
#include "pci_list.h"
|
||||
|
||||
|
||||
void pci_write_field(uint32_t device, int field, int size, uint32_t value) {
|
||||
|
@ -5,9 +5,9 @@
|
||||
*
|
||||
* Programmable Interrupt Timer
|
||||
*/
|
||||
#include <system.h>
|
||||
#include <logging.h>
|
||||
#include <process.h>
|
||||
#include <kernel/system.h>
|
||||
#include <kernel/logging.h>
|
||||
#include <kernel/process.h>
|
||||
|
||||
#define PIT_A 0x40
|
||||
#define PIT_B 0x41
|
||||
|
@ -4,7 +4,7 @@
|
||||
* Copyright (C) 2015 Dale Weiler
|
||||
* 2015 Kevin Lange
|
||||
*/
|
||||
#include "bitset.h"
|
||||
#include <kernel/bitset.h>
|
||||
|
||||
#define CEIL(NUMBER, BASE) \
|
||||
(((NUMBER) + (BASE) - 1) & ~((BASE) - 1))
|
||||
|
@ -3,8 +3,8 @@
|
||||
* of the NCSA / University of Illinois License - see LICENSE.md
|
||||
* Copyright (C) 2013-2014 Kevin Lange
|
||||
*/
|
||||
#include "list.h"
|
||||
#include "hashmap.h"
|
||||
#include <kernel/list.h>
|
||||
#include <kernel/hashmap.h>
|
||||
|
||||
unsigned int hashmap_string_hash(void * _key) {
|
||||
unsigned int hash = 0;
|
||||
|
@ -6,13 +6,13 @@
|
||||
* General-purpose list implementations.
|
||||
*/
|
||||
|
||||
#include "list.h"
|
||||
|
||||
#ifdef _KERNEL_
|
||||
# include <system.h>
|
||||
# include <kernel/list.h>
|
||||
# include <kernel/system.h>
|
||||
#else
|
||||
# include <stddef.h>
|
||||
# include <stdlib.h>
|
||||
# include <toaru/list.h>
|
||||
#endif
|
||||
|
||||
void list_destroy(list_t * list) {
|
||||
|
@ -3,9 +3,9 @@
|
||||
* of the NCSA / University of Illinois License - see LICENSE.md
|
||||
* Copyright (C) 2013-2014 Kevin Lange
|
||||
*/
|
||||
#include <system.h>
|
||||
#include <ringbuffer.h>
|
||||
#include <process.h>
|
||||
#include <kernel/system.h>
|
||||
#include <kernel/ringbuffer.h>
|
||||
#include <kernel/process.h>
|
||||
|
||||
size_t ring_buffer_unread(ring_buffer_t * ring_buffer) {
|
||||
if (ring_buffer->read_ptr == ring_buffer->write_ptr) {
|
||||
|
@ -6,11 +6,11 @@
|
||||
* General-purpose tree implementation
|
||||
*/
|
||||
|
||||
#include "tree.h"
|
||||
|
||||
#ifdef _KERNEL_
|
||||
# include <system.h>
|
||||
# include <kernel/tree.h>
|
||||
# include <kernel/system.h>
|
||||
#else
|
||||
# include <toaru/tree.h>
|
||||
# include <stddef.h>
|
||||
# include <stdlib.h>
|
||||
#endif
|
||||
|
@ -7,11 +7,11 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <system.h>
|
||||
#include <fs.h>
|
||||
#include <printf.h>
|
||||
#include <pipe.h>
|
||||
#include <logging.h>
|
||||
#include <kernel/system.h>
|
||||
#include <kernel/fs.h>
|
||||
#include <kernel/printf.h>
|
||||
#include <kernel/pipe.h>
|
||||
#include <kernel/logging.h>
|
||||
|
||||
#define DEBUG_PIPES 0
|
||||
|
||||
|
@ -8,12 +8,12 @@
|
||||
* Provide raw block access to files loaded into kernel memory.
|
||||
*/
|
||||
|
||||
#include <system.h>
|
||||
#include <logging.h>
|
||||
#include <module.h>
|
||||
#include <fs.h>
|
||||
#include <printf.h>
|
||||
#include <mem.h>
|
||||
#include <kernel/system.h>
|
||||
#include <kernel/logging.h>
|
||||
#include <kernel/module.h>
|
||||
#include <kernel/fs.h>
|
||||
#include <kernel/printf.h>
|
||||
#include <kernel/mem.h>
|
||||
|
||||
static uint32_t read_ramdisk(fs_node_t *node, uint32_t offset, uint32_t size, uint8_t *buffer);
|
||||
static uint32_t write_ramdisk(fs_node_t *node, uint32_t offset, uint32_t size, uint8_t *buffer);
|
||||
|
@ -3,15 +3,15 @@
|
||||
* of the NCSA / University of Illinois License - see LICENSE.md
|
||||
* Copyright (C) 2013-2014 Kevin Lange
|
||||
*/
|
||||
#include <system.h>
|
||||
#include <fs.h>
|
||||
#include <pipe.h>
|
||||
#include <logging.h>
|
||||
#include <printf.h>
|
||||
#include <kernel/system.h>
|
||||
#include <kernel/fs.h>
|
||||
#include <kernel/pipe.h>
|
||||
#include <kernel/logging.h>
|
||||
#include <kernel/printf.h>
|
||||
#include <kernel/ringbuffer.h>
|
||||
|
||||
#include <ioctl.h>
|
||||
#include <termios.h>
|
||||
#include <ringbuffer.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/termios.h>
|
||||
|
||||
#define TTY_BUFFER_SIZE 4096
|
||||
//4096
|
||||
|
@ -3,14 +3,14 @@
|
||||
* of the NCSA / University of Illinois License - see LICENSE.md
|
||||
* Copyright (C) 2014 Kevin Lange
|
||||
*/
|
||||
#include <system.h>
|
||||
#include <fs.h>
|
||||
#include <pipe.h>
|
||||
#include <logging.h>
|
||||
#include <printf.h>
|
||||
#include <kernel/system.h>
|
||||
#include <kernel/fs.h>
|
||||
#include <kernel/pipe.h>
|
||||
#include <kernel/logging.h>
|
||||
#include <kernel/printf.h>
|
||||
#include <kernel/ringbuffer.h>
|
||||
|
||||
#include <ioctl.h>
|
||||
#include <ringbuffer.h>
|
||||
#include <sys/ioctl.h>
|
||||
|
||||
#define UNIX_PIPE_BUFFER 512
|
||||
|
||||
|
@ -8,13 +8,13 @@
|
||||
* Virtual File System
|
||||
*
|
||||
*/
|
||||
#include <system.h>
|
||||
#include <fs.h>
|
||||
#include <printf.h>
|
||||
#include <list.h>
|
||||
#include <process.h>
|
||||
#include <logging.h>
|
||||
#include <hashmap.h>
|
||||
#include <kernel/system.h>
|
||||
#include <kernel/fs.h>
|
||||
#include <kernel/printf.h>
|
||||
#include <kernel/list.h>
|
||||
#include <kernel/process.h>
|
||||
#include <kernel/logging.h>
|
||||
#include <kernel/hashmap.h>
|
||||
|
||||
#define MAX_SYMLINK_DEPTH 8
|
||||
#define MAX_SYMLINK_SIZE 4096
|
||||
|
@ -1 +0,0 @@
|
||||
../../include/errno.h
|
@ -1 +0,0 @@
|
||||
../../include/sys/ioctl.h
|
@ -1 +0,0 @@
|
||||
../../include/sys/signal_defs.h
|
@ -1 +0,0 @@
|
||||
../../include/syscall_nums.h
|
@ -1 +0,0 @@
|
||||
../../lib/termemu.h
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user