@node Debugging versus Testing
@subsection Debugging versus Testing
-When you're debugging code, it's useful to be able to be able to run a
+When you're debugging code, it's useful to be able to run a
program twice and have it do exactly the same thing. On second and
later runs, you can make new observations without having to discard or
verify your old observations. This property is called
Called during Pintos shutdown to print thread statistics.
@end deftypefun
-@deftypefun void thread_create (const char *@var{name}, int @var{priority}, thread_func *@var{func}, void *@var{aux})
+@deftypefun tid_t thread_create (const char *@var{name}, int @var{priority}, thread_func *@var{func}, void *@var{aux})
Creates and starts a new thread named @var{name} with the given
@var{priority}, returning the new thread's tid. The thread executes
@var{func}, passing @var{aux} as the function's single argument.
on shared data and other resources (@pxref{Synchronization}).
@deftypefun void intr_register_int (uint8_t @var{vec}, int @var{dpl}, enum intr_level @var{level}, intr_handler_func *@var{handler}, const char *@var{name})
-Registers @var{func} to be called when internal interrupt numbered
+Registers @var{handler} to be called when internal interrupt numbered
@var{vec} is triggered. Names the interrupt @var{name} for debugging
purposes.
Whereas an internal interrupt runs in the context of the thread that
caused it, external interrupts do not have any predictable context.
-They are asynchronous, so it can be invoked at any time that
-interrupts have not been enabled. We say that an external interrupt
+They are asynchronous, so they can be invoked at any time that
+interrupts have not been disabled. We say that an external interrupt
runs in an ``interrupt context.''
In an external interrupt, the @struct{intr_frame} passed to the