The first array is for unmodified F keys the second is used when a shifted F

The first array is for unmodified f keys the second

This preview shows page 56 - 58 out of 140 pages.

since modern PC keyboards have twelve F-keys. The first array is for unmodified F-keys, the second is used when a shifted F-key is detected. They are composed of elements of type obs_t, which is a structure that can hold a process number and an integer. This structure and these arrays are declared in keyboard.c on lines 15279 to 15281. Initialization stores a special value, symbolically represented as NONE, in the proc_nr component of the structure to indicate it is not in use. NONE is a value outside the range of valid process numbers. Note that the process number is not a pid, it identifies a slot in the process table. This terminology may be confusing. But to send a notification a process number rather than a pid is used, because process numbers are used to index the priv table which determines whether a process is allowed to receive notifications. The integer events is also initially set to zero. It will be used to count events. The next three functions are all rather simple. Kbd_loadmap (line 15610) is almost trivial. It is called by do_ioctl in tty.c to do the copying of a keymap from user space to overwrite the default keymap. The default is compiled by the inclusion of a keymap source file at the start of keyboard.c. From its first release, MINIX has always provided for dumps of various kinds of system information or other special actions in response to pressing the function keys F1, F2, etc., on the system console. This is not a service generally provided in other operating systems, but MINIX was always intended to be a teaching tool. Users are encouraged to tinker with it, which means users may need extra help for debugging. In many cases the output produced by pressing one of the F-keys will be available even when the system has crashed. Figure 3-43 summarizes these keys and their effects. Figure 3-43. The function keys detected by func_key(). (This item is displayed on page 356 in the print version) Key Purpose F1 Kernel process table F2 Process memory maps F3 Boot image F4 Process privileges F5 Boot monitor parameters F6 IRQ hooks and policies F7 Kernel messages F10 Kernel parameters F11 Timing details (if enabled)
Image of page 56
Figure 3-43. The function keys detected by func_key(). (This item is displayed on page 356 in the print version) Key Purpose F12 Scheduling queues SF1 Process manager process table SF2 Signals SF3 File system process table SF4 Device/driver mapping SF5 Print key mappings SF9 Ethernet statistics (RTL8139 only) CF1 Show key mappings CF3 Toggle software/hardware console scrolling CF7 Send SIGQUIT, same effect as CTRL-\ CF8 Send SIGINT, same effect as CTRL-C CF9 Send SIGKILL, same effect as CTRL-U These keys fall into two categories. As noted earlier, the CTRL-F1 through CTRL-F12 key combinations are detected by kb_read. These trigger events that can be handled by the terminal driver. These events are not necessarily display dumps. In fact, currently only CTRL-F1 provides an information display; it lists function key bindings. CTRL-F3 toggles hardware and software scrolling of the console screen, and the others cause signals.
Image of page 57
Image of page 58

You've reached the end of your free preview.

Want to read all 140 pages?

  • One '20
  • ASCII

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern

Stuck? We have tutors online 24/7 who can help you get unstuck.
A+ icon
Ask Expert Tutors You can ask You can ask ( soon) You can ask (will expire )
Answers in as fast as 15 minutes
A+ icon
Ask Expert Tutors