Skip to content

Instantly share code, notes, and snippets.

View kyoungho-koo's full-sized avatar

kyoungho kyoungho-koo

View GitHub Profile
@kyoungho-koo
kyoungho-koo / list.h
Last active April 8, 2018 15:41
linked list
struct list_elem
{
struct list_elem *prev;
struct list_elem *next;
};
struct list
{
struct list_elem head;
struct list_elem tail;
@kyoungho-koo
kyoungho-koo / debug.h
Created April 6, 2018 16:22
redefine printf for color log
#define DEBUG_LOG
#ifdef DEBUG_LOG
#define ANSI_COLOR_RED "\x1b[31m"
#define ANSI_COLOR_YELLOW "\x1b[33m"
#define ANSI_COLOR_RESET "\x1b[0m"
#define LOG(fmt,...) printf(ASNI_COLOR_YELLOW fmt "\n" ANSI_COLOR_RESET, ##__VA_ARGS__)
#define ERROR(fmt,...) printf(ANSI_COLOR_RED fmt "\n" ANSI_COLOR_RESET,##__VA_ARGS__)
#else
#define LOG(fmt,...)
#define ERROR(fmt,...)
pintos-mkdisk filesys.dsk --filesys-size=2
pintos -f -q
pintos -p tests/userprog/create-normal -a create-normal -- -q
pintos run 'create-normal'
pintos -q run 'create-normal' // childe process