DIGITAL logo   C++ Graphic
    Updated: 21 November 1998
  cxxl$help.HLP

Global_Declarations

These enums, externs, and typedefs of the task package are used by one or more classes but they are not members of any particular class.

Additional Information on:

  • Print_Function_Values
  • Queue_Mode_Values
  • Exception_Codes
  • Maximum_stack_size

  • erand

    Objects of this class are generators of exponentially distributed random numbers.


    histogram

    Objects of this class generate histograms.


    Interrupt_handler

    Interrupt handlers let tasks wait for external events (system signals), and allow the declaration of handler functions for these events.

    You can use classes derived from the Interrupt_handler class to overload the interrupt() function. When the signal is raised, the task system immediately calls the interrupt() function. The task system then schedules its own internal interrupt alerter for execution. Control returns to the task (if any) that was running when the signal was raised. When control returns to the scheduler, the interrupt alerter runs and schedules for execution those tasks that were waiting for the interrupt handler.

    If the run chain is empty, the scheduler does not cause the program to exit if there are any interrupt handlers that have been created but not yet destroyed.


    object

    This class is a base class for many other classes within the task package. You can also use it to derive user classes to be placed in the task package's queues and so forth. All objects derived from the object class can declare the virtual function object::pending(), which the scheduler uses to determine if an object is ready or not. You can provide each kind of object with its own method of determining its state of readiness. Each pending object contains a list (the remember chain) of the waiting task objects.


    qhead

    This class provides facilities for taking objects off a queue. A queue is a data structure with an associated list of objects of the object class, or a class derived from the object class in first-in, first-out order. All access to a queue is through either the attached qhead or the attached qtail. You create a queue by creating either a qhead or a qtail. The other end of the queue is created automatically. You can then obtain a pointer to the tail with the qhead::tail function.

    Objects have definitions of when they are ready and pending (not ready). The qhead objects are ready when the queue is not empty and pending when the queue is empty.


    qtail

    This class provides facilities for putting objects into a queue. A queue is a data structure with an associated list of objects of the object class, or a class derived from the object class in first-in, first-out order. All access to a queue is through either the attached qhead or the attached qtail. You create a queue by creating either a qhead or a qtail. The other end of the queue is created automatically. You can then obtain a pointer to the head with the qtail::head function.

    Objects have definitions of when they are ready and pending (not ready). The qtail objects are ready when the queue is not full and pending when the queue is full.


    randint

    Objects of this class generate uniformly distributed random numbers. Each random-number generator object produces a sequence that is independent of other random-number generator objects.


    sched

    This class provides facilities for checking on the state of a task, manipulating the simulated clock, canceling a task, and checking on the result of a task.

    You can create instances of classes derived from the sched class, but not instances of the sched class itself.


    task

    All coroutine classes are derived from this class. All work for an object of a given coroutine type occurs within the constructor for that type. The coroutine class must be exactly one level of derivation from the task class. When the object is created, the constructor takes control and runs until halted by one of the following functions:

    wait() sleep() resultis()

    When a task executes a blocking function on an object that is ready, the operation succeeds immediately and the task continues running; if the object is pending, the task waits. Control then returns to the scheduler, which selects the next task from the ready list or run chain. When a pending object becomes ready, the system puts any task waiting for that object back on the run chain.

    A task can be in one of the following states:

    RUNNING Running or ready to run

    IDLE Waiting for a pending object

    TERMINATED Completed; not able to resume running (but you can retrieve the result)


    timer

    Objects of this class are timers. When a timer is created its state is RUNNING, and it is scheduled to change its state to TERMINATED after a specified number of time units. When the timer becomes TERMINATED, tasks waiting for it are scheduled to resume execution.


    urand

    Objects of this class generate uniformly distributed random integers within a given range from a low to a high value.

       
    Burgundy bar
    DIGITAL Home Feedback Search Sitemap Subscribe Help
    Legal