# libtasks -- Cooperative Task Switching

A cooperative (non-preemptive) multitasking library.  Tasks yield
voluntarily via `tsYield()`; the scheduler picks the next runnable task
by priority.  Used by the DVX shell to run multiple DXE applications
concurrently.

## Documentation

Full reference is in `libtasks.dhs` (this directory), compiled into the
DVX System Reference.  Open via the Help Viewer app, or read
`docs/dvx_system_reference.html` after `make`.

Topics covered: `TaskT` struct, `tsInit` / `tsShutdown` / `tsSpawn` /
`tsYield` / `tsCurrent` / `tsKill` / `tsPause` / `tsSetPriority`, priority
model, stack allocation, and the exact return-code semantics for each
entry point.

## Source Files

- `taskSwch.h`     -- public API
- `taskswitch.c`   -- implementation (context save/restore, scheduler)

## Build

`make -C src/libs/kpunch/libtasks` (invoked by the top-level `make`).
