This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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,...) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct list_elem | |
{ | |
struct list_elem *prev; | |
struct list_elem *next; | |
}; | |
struct list | |
{ | |
struct list_elem head; | |
struct list_elem tail; |