Hide menu

Browsing the code

As a convenient feature in emacs, we recomend that you make use of tags. All you need to do is to change directory in the terminal to your new ${HOME}/linuxpintos/src and run:

    
  make TAGS

This creates an index of structs and functions in a new file named TAGS. Now let's find where the pintos semaphore is. Start emacs and press meta-. (hold meta and press dot). Type the keyword you wish to look for, "semaphore" in this case, and press enter. Press enter again to confirm the path to your TAGS file, and there you are!

Sometimes when you want to know where a file is in the hierarchy this command is useful:

     find ${HOME}/linuxpintos/src |grep filename

Try find the file list.c. Open it to see a more complicated linked list implementation than the one you just created.

Now imagine that you want to find all files where this list is used, for this you can use the following command:

     find ${HOME}/linuxpintos/src -type f -print |xargs grep list_init

Page responsible: M. Asplund and K. Arvidsson
Last updated: 2024-03-07