-@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.
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})
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})
Whereas an internal interrupt runs in the context of the thread that
caused it, external interrupts do not have any predictable context.
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
runs in an ``interrupt context.''
In an external interrupt, the @struct{intr_frame} passed to the