IN  PKTHREAD Thread,
  IN  KAFFINITY Affinity

Routine Description:

    This function sets the affinity of a specified thread to a new
    value. If the new affinity is not a proper subset of the parent
    process affinity, or is null, then an error condition is raised.
    If the specified thread is running on, or about to run on, a
    processor for which it is no longer able to run, then the target
    processor is rescheduled. If the specified thread is in a ready
    state and is not in the parent process ready queue, then it is
    rereadied to reevaluate any additional processors it may run on.


    Thread  - Supplies a pointer to a dispatcher object of type thread.

    Affinity - Supplies the new of set of processors on which the thread
        can run.

Return Value:

    The previous affinity of the specified thread.