This file contains 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
#include <stdint.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
typedef struct list List; | |
typedef uint8_t Value; | |
struct list { | |
List* next; | |
Value value; |
This file contains 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
#include <stdio.h> | |
#include <stdint.h> | |
int main(int argc, char* argv[]) { | |
// 作成 | |
uint8_t numbers[3] = {1, 2, 3}; | |
// 参照 | |
for (size_t i = 0; i < (sizeof(numbers) / sizeof(numbers[0])); ++i) { | |
printf("numbers[%zd] = %u\n", i, numbers[0]); |
This file contains 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
" radian = degrees * Math.PI / 180; | |
" degrees = radian * 180 / Math.PI; | |
function! s:rad_to_deg(r) abort | |
return a:r * 180.0 / 3.141592 | |
endfunction | |
function! s:deg_to_rad(d) abort | |
return a:d * 3.141592 / 180.0 | |
endfunction |
This file contains 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
https://gist.github.com/mopp/94d5421fc09fac6281cb |
This file contains 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
野菜屋SUN,野菜,11:00~18:00,無休,野菜をお腹いっぱい食べれる・女性が多い | |
くるくる軒,ラーメン,11:30~21:00,水曜,裏メニューで唐揚げが頼めたりする | |
麺屋あおい,ラーメン,11:00~15:00 17:00~20:30,木曜,トマトラーメンがある | |
一風亭,ラーメン,11:00~14:30 17:00~20:00,火曜 祝日は翌日休み,肉系が美味しい | |
小豆屋,ラーメン,11:30~15:00 18:00~21:00,火曜,味噌メインだが醤油が美味しいと噂 | |
牛乳屋,ラーメン,11:00~15:00 17:00~20:00,水曜,大戸にあるので大学から遠い | |
担々麺のおみせ,ラーメン,火~土 11:00~15:30 17:00~23:00;祝・日 11:00~19:30,月曜 月に1回日曜休み,目の前に駐車場がないので近くのリオンに停めて歩く | |
頓珍館,ラーメン,11:00~15:30 17:00~21:20,無休,最強みそこってりラーメン背脂増しは胃に良くない | |
山海,ラーメン,11:00~14:00,不定休,最近夜もラーメン提供しているとの噂 | |
幸楽苑,ラーメン,10:45~02:00,無休,定番 |
This file contains 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
# Filtered ls | |
function fls() { | |
if [ $# -eq 0 ]; then | |
ls | |
exit 0 | |
fi | |
ls_arg="" | |
grep_arg="" |
This file contains 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
static inline Axel_state_code init_user_process(void) { | |
// プロセス構造体を新規確保 | |
Process* p = alloc_proc(NULL); | |
User_segments* us = &p->u_segs; | |
// プログラム用のメモリ確保 | |
us->text.addr = DEFAULT_TEXT_ADDR; | |
us->text.size = 0; | |
us->stack.addr = DEFAULT_STACK_TOP_ADDR; | |
us->stack.size = 0; |
This file contains 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
;--------------------------------------------------------------------- | |
; vim:ft=nasm:foldmethod=marker | |
; File: src/interrupt_handler.asm | |
; Description: It provides interrupt handler entry point | |
;--------------------------------------------------------------------- | |
bits 32 | |
section .text | |
extern interrupt_timer |
This file contains 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
void __fastcall change_context(Process* current, Process* next) { | |
(void)current; | |
run_proc= next; | |
} | |
void switch_context(Interrupt_frame* current_iframe) { | |
Process* current_p = running_proc(); | |
Process* next_p = next_proc(); | |
if (current_p == next_p) { |
This file contains 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
#include <stdlib.h> | |
#include <stdio.h> | |
#include <string.h> | |
char* global_strs = NULL; | |
void do_free(void) { | |
if (global_strs != NULL) { | |
free(global_strs); |
NewerOlder