
{ This common deck contains the task status codes used by the
{ task management procedures that run in monitor mode.


{Define task status values. Task status' are divided into 3 groups depending on where tasks that
{are in the status are threaded in the dispatch tables.
{   GROUP 1A- tasks are linked into the DCT.
{   GROUP 1B- tasks are ready and have been selected to execute on a specific processor.
{   GROUP 2A- tasks are threaded into a timed wait queue.
{   GROUP 2B- tasks are in a timed wait, but will not be threaded into a timed wait queue until
{             closer to the end of wait time.
{   GROUP 3A- tasks are not in any queue. Tasks are waiting for a 'conditional' ready
{             task request.
{   GROUP 3B- tasks are not in any queue. However, tasks can only be made ready
{             by an 'unconditional' ready task request.
{   GROUP 3C- tasks are not in a DCT queue but are queued on some external event in a wait queue.
{             Tasks can only be placed or removed in/from these status via the
{             tmp$queue_task and tmp$dequeue_task requests.

  CONST
    tmc$ts_last_status_in_dct = tmc$ts_ready,
    tmc$ts_first_status_in_wait_q = tmc$ts_timeout_reqexp_shortshrt,
    tmc$ts_last_status_in_wait_q = tmc$ts_timeout_reqexp_longvlong,
    tmc$last_timed_wait_status = tmc$ts_timed_wait_not_queued,
    tmc$ts_first_ready_uncond = tmc$ts_io_wait_not_queued,
    tmc$ts_first_external_queue = tmc$ts_page_wait,
    tmc$ts_last_external_queue = tmc$ts_avail_mod_q_full_wait;


  TYPE
    tmt$task_status = (tmc$ts_null, tmc$ts_ready,
{                                                                         END GROUP 1A}
          tmc$ts_ready_and_selected,
{                                                                         END GROUP 1B}
          tmc$ts_timeout_reqexp_shortshrt,
          tmc$ts_timeout_reqexp_longlong, tmc$ts_timeout_reqexp_longvlong,
{                                                                         END GROUP 2A}
          tmc$ts_timed_wait_not_queued,
{                                                                         END GROUP 2B}
          tmc$ts_executing,
          tmc$ts_timeout_reqexp_inflong, tmc$ts_timeout_reqexp_infvlong,
          tmc$ts_ready_but_swapped,
{                                                                         END GROUP 3A}
          tmc$ts_io_wait_not_queued,
{                                                                         END GROUP 3B}
          tmc$ts_page_wait, tmc$ts_memory_wait, tmc$ts_segment_lock_wait,
          tmc$ts_job_event_queue, tmc$ts_io_wait_queued, tmc$ts_volume_unavailable,
          tmc$ts_avail_mod_q_full_wait),
{                                                                         END GROUP 3C}
    tmt$idle_status = (tmc$is_not_idled, tmc$is_idle_initiated, tmc$is_idled,
      tmc$is_idled_sched_notified),

    tmt$ready_condition = (tmc$rc_ready_conditional_wi, tmc$rc_ready_conditional);
