linux-kernel

kernel/sched.c 2968 profile_hit(SCHED_PROFILING, __builtin_return_address(0)); 2969 SCHED_PROFILINGは2,__builtin_return_address関数はgccの関数らしい。 実行中の復帰アドレスを取得できる。http://www.cqpub.co.jp/interface/column/freesoft/2003/…

sched.cを読み進めたいのだが。。

kernel/sched.c 2960 if (likely(!current->exit_state)) { 2961 if (unlikely(in_atomic())) { 2962 printk(KERN_ERR "scheduling while atomic: " 2963 "%s/0x%08x/%d\n", 2964 current->comm, preempt_count(), current->pid); 2965 dump_stack(); 2966 }…

asmlinkageについて

パッケージスケジューラの実装である kernel/sched.hにおいて 2941 /* 2942 * schedule() is the main scheduler function. 2943 */ 2944 asmlinkage void __sched schedule(void) 2945 { 2946 long *switch_count; 先頭についているasmlinkageって何なの?…

メモ

いたるところで呼ばれているcurrentという変数が使われている。それぞれのアーキテクチャーのcurrent.hに記述されてた。./include/asm-i386/current.h 8 static inline struct task_struct * get_current(void) 9 { 10 return current_thread_info()->task; …