Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
ユーザーが proc ファイルを読み書きできるモジュールを作成しました - カーネル レベルのプログラミングで読み書きしているユーザー プロセスのスレッド数を確認するにはどうすればよいですか?
読み取り/書き込み関数内currentで現在のタスク ( current ) へのポインターとして使用します。task_struct
current
task_struct
#include <linux/sched.h> struct task_struct * t; for (t = next_thread(current); t != current; t = next_thread(t)) { // do the stuff }