Files | |
file | sched_up.c |
Scheduling function for uni-processor. | |
Functions | |
void | rt_set_periodic_mode (void) |
Set timer mode. | |
void | rt_set_oneshot_mode (void) |
Set timer mode. | |
RTIME | start_rt_timer (int period) |
Start timer. | |
void | start_rt_apic_timers (struct apic_timer_setup_data *setup_mode, unsigned int rcvr_jiffies_cpuid) |
Start local apic timer. | |
void | stop_rt_timer (void) |
Stop timer. | |
RTIME | count2nano (RTIME counts) |
Convert internal count units to nanoseconds. | |
RTIME | nano2count (RTIME ns) |
Convert nanoseconds to internal count units. | |
RTIME | count2nano_cpuid (RTIME counts, unsigned int cpuid) |
Convert internal count units to nanoseconds. | |
RTIME | nano2count_cpuid (RTIME ns, unsigned int cpuid) |
Convert nanoseconds to internal count units. | |
RTIME | rt_get_time (void) |
Get the current time. | |
RTIME | rt_get_time_cpuid (unsigned int cpuid) |
Get the current time. | |
RTIME | rt_get_time_ns (void) |
Get the current time. | |
RTIME | rt_get_time_ns_cpuid (unsigned int cpuid) |
Get the current time. | |
RTIME | rt_get_cpu_time_ns (void) |
Get the current time. |
|
Convert internal count units to nanoseconds. This function converts the time of timercounts internal count units into nanoseconds. Remember that the count units are related to the time base being used (see functions rt_set_oneshot_mode() and rt_set_periodic_mode() for an explanation).
|
|
Convert internal count units to nanoseconds. This function converts the time of timercounts internal count units into nanoseconds. It is to be used with the MUP scheduler since with such a scheduler it is possible to have independent timers, i.e. periodic of different periods or a mixing of periodic and oneshot, so that it is impossible to establish which conversion units should be used in the case one asks for a conversion from any CPU for any other CPU. All these functions have the same behavior with UP and SMP schedulers.
|
|
Convert nanoseconds to internal count units. This function converts the time of nanosecs nanoseconds into internal counts units. Remember that the count units are related to the time base being used (see functions rt_set_oneshot_mode() and rt_set_periodic_mode() for an explanation). The versions ending with_cpuid are to be used with the MUP scheduler since with such a scheduler it is possible to have independent timers, i.e. periodic of different periods or a mixing of periodic and oneshot, so that it is impossible to establish which conversion units should be used in the case one asks for a conversion from any CPU for any other CPU. All these functions have the same behavior with UP and SMP schedulers.
|
|
Convert nanoseconds to internal count units. This function converts the time of nanosecs nanoseconds into internal counts units. Remember that the count units are related to the time base being used (see functions rt_set_oneshot_mode() and rt_set_periodic_mode() for an explanation). This function is to be used with the MUP scheduler since with such a scheduler it is possible to have independent timers, i.e. periodic of different periods or a mixing of periodic and oneshot, so that it is impossible to establish which conversion units should be used in the case one asks for a conversion from any CPU for any other CPU. All these functions have the same behavior with UP and SMP schedulers.
|
|
Get the current time. rt_get_cpu_time_ns always returns the CPU time in nanoseconds whatever timer is in use.
|
|
Get the current time. rt_get_time returns the time, in internal count units, since start_rt_timer was called. In periodic mode this number is in multiples of the periodic tick. In oneshot mode it is directly the TSC count for CPUs having a time stamp clock (TSC), while it is a (FIXME) on 8254 units for those not having it (see functions rt_set_oneshot_mode() and rt_set_periodic_mode() for an explanation).
|
|
Get the current time. rt_get_time_cpuid returns the time, in internal count units, since start_rt_timer was called. In periodic mode this number is in multiples of the periodic tick. In oneshot mode it is directly the TSC count for CPUs having a time stamp clock (TSC), while it is a (FIXME) on 8254 units for those not having it (see functions rt_set_oneshot_mode() and rt_set_periodic_mode() for an explanation). This version ending with _cpuid must be used with the MUP scheduler when there is the need to declare from which cpuid the time must be gotten (FIXME). In fact one can need to get the time of another CPU and timers can differ from CPU to CPU. (FIXME) All these functions have the same behavior with UP and SMP schedulers.
|
|
Get the current time. rt_get_time_ns is the same as rt_get_time() but the returned time is converted to nanoseconds.
|
|
Get the current time. rt_get_time_ns is the same as rt_get_time but the returned time is converted to nanoseconds. The version ending with _cpuid must be used with the MUP scheduler when there is the need to declare from which cpuidthe time must be got. In fact one can need to get the time of another CPU and timers can differ from CPU to CPU. All these functions have the same behavior with UP and SMP schedulers.
|
|
Set timer mode. rt_set_periodic_mode sets the periodic mode for the timer. It consists of a fixed frequency timing of the tasks in multiple of the period set with a call to start_rt_timer(). The resolution is that of the 8254 (1193180 Hz) on a UP machine, or if the 8254 based SMP scheduler is being used. For the SMP scheduler timed by the local APIC timer and for the MUP scheduler the timer resolution is that of the local APIC timer frequency, generally the bus frequency divided 16. Any timing request not being an integer multiple of the set timer period is satisfied at the closest period tick. It is the default mode when no call is made to set the oneshot mode.
|
|
Set timer mode. rt_set_periodic_mode sets the periodic mode for the timer. It consists of a fixed frequency timing of the tasks in multiple of the period set with a call to start_rt_timer(). The resolution is that of the 8254 (1193180 Hz) on a UP machine, or if the 8254 based SMP scheduler is being used. For the SMP scheduler timed by the local APIC timer and for the MUP scheduler the timer resolution is that of the local APIC timer frequency, generally the bus frequency divided 16. Any timing request not being an integer multiple of the set timer period is satisfied at the closest period tick. It is the default mode when no call is made to set the oneshot mode.
|
|
Start local apic timer. start_rt_apic_timers starts local APIC timers according to what is found in setup_data.
|
|
Start timer. start_rt_timer starts the timer with a period period. The period is in internal count units and is required only for the periodic mode. In the oneshot mode the period value is ignored. This functions uses the 8254 with the UP and the 8254 based SMP scheduler. Otherwise it uses a single local APIC with the APIC based SMP schedulers and an APIC for each CPU with the MUP scheduler. In the latter case all local APIC timers are paced in the same way, according to the timer mode set.
|
|
Stop timer. stop_rt_timer stops the timer. The timer mode is set to periodic.
|