【正文】
that is, the task’s program counter the CPU registers and (optionally) floatingpoint registers I/O assignments for standard input, output, and error a delay timer a timeslice timer kernel control structures signal handlers debugging and performance monitoring values Task The default task scheduling algorithm in wind is prioritybased preemptive scheduling. Round Robin is an optional algorithm. The wind kernel has 256 priority levels, numbered 0 through 255. Priority 0 is the highest and priority 255 is the lowest. Task Scheduler Control Routines Task Task Lock When a task disables the scheduler by calling taskLock(), no prioritybased preemption can take place while that task is running. If the task explicitly blocks or suspends, the scheduler selects the next highestpriority eligible task to execute. When the preemptionlocked task unblocks and begins running again, preemption is again disabled. The taskLock() prevent task context switching, but do not lock out interrupt handling. Task Control Routine Task taskSpawn Task Name and ID Routines Task Information Routines Task Deleting Routines Task Control Routines Task Hook Routines Task Spawn Task Name and ID Routines Task Information Routines Task Information Routines Task Deleting Routines Task Deleting Routines Task Control Routines Task Hook Routines Shared Code and Reentrancy A single copy of code executed by multiple tasks is called shared code. A subroutine is reentrant if a single copy of the routine can be called from several task contexts simultaneously without conflict. Modify global or static variables. Code Reentran