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.
私は大学のプロジェクトでナチョスを勉強していますが、以下のコードのDEBUG(...)ステートメントが何をしているのか理解できません。
void ThreadTest1() { DEBUG('t', "Entering ThreadTest1"); Thread *t = new Thread("forked thread"); t->Fork(SimpleThread, 1); SimpleThread(0); }
誰か助けてもらえますか?
DEBUGは、$ nachos -d tiのように、「-d」オプションを指定してコードを実行するとアクティブになる条件付き印刷ステートメントです。いくつかのデバッグフラグがあります。たとえば、「t」はスレッドイベントの出力(デバッグ)を有効にします。これは、コードスニペットによって追跡されていると思われます。