sys/src/timeschdl.c File Reference

timer system hardware interrupt More...

#include <queue.h>
#include <asmlink.h>
#include <pridef.h>
#include <ipldef.h>
#include <lkbdef.h>
#include <phddef.h>
#include <ipl.h>
#include <linux/linkage.h>
#include <linux/sched.h>
#include <linux/errno.h>
#include <linux/kernel.h>
#include <linux/param.h>
#include <linux/string.h>
#include <linux/mm.h>
#include <linux/interrupt.h>
#include <linux/time.h>
#include <linux/delay.h>
#include <linux/init.h>
#include <linux/smp.h>
#include <asm/io.h>
#include <asm/smp.h>
#include <asm/irq.h>
#include <asm/msr.h>
#include <asm/delay.h>
#include <asm/mpspec.h>
#include <asm/uaccess.h>
#include <asm/processor.h>
#include <linux/mc146818rtc.h>
#include <linux/timex.h>
#include <linux/config.h>
#include <asm/fixmap.h>
#include <linux/irq.h>
#include <linux/kernel_stat.h>
#include <asm/hw_irq.h>
#include <sysgen.h>
#include <rse.h>
#include <system_data_cells.h>
#include <internals.h>
#include <exe_routines.h>
#include <misc_routines.h>
#include <sch_routines.h>
#include <ddbdef.h>

Go to the source code of this file.

Defines

#define TICK_SIZE   tick

Functions

void exe_timeout (void)
 regular system job - see 5.2 11.8.2
void printtq (struct _tqe *t)
asmlinkage void exe_swtimint (void)
 software timer interrupt service routine - see 5.2 11.8

Variables

int pid1count
int pid0count
int countme2
rwlock_t xtime_lock
spinlock_t i8253_lock
unsigned long last_tsc_low
int mydebug5
int mydebug6
int in_idle_while
int delay_at_last_interrupt
long last_rtc_update
int use_tsc
int exetimeout = 0
int vmstimerconf


Detailed Description

timer system hardware interrupt

Author:
Roar Thronęs

Definition in file timeschdl.c.


Define Documentation

#define TICK_SIZE   tick

Definition at line 75 of file timeschdl.c.


Function Documentation

asmlinkage void exe_swtimint ( void   ) 

software timer interrupt service routine - see 5.2 11.8

linux leftover or something?

locate process header

test for quantum end and maybe run sch_qend

note that the spinlocks are now inside sch_qend

test if primary cpu

acquire both TIMER and HWCLK spinlocks

iterate

compare system time with 1st time for timer entry

remove first tqe from queue

release both TIMER and HWCLK spinlocks

11.8.1 process timer requests

if TQTYPE CHK_CPUTIM ... - MISSING

test if process still alive - MISSING

if not or if illegal efn, deallocate tqe - MISSING

increment jib tqcnt - MISSING

test jib flags to see if someone waits - MISSING

run sch_chse for each such process - MISSING

test if acb quota in tqe set, user wants ast - MISSING

copy some field to ast - MISSING

call qast

11.8,2 periodic system routine requests TODO check if right

just call it

11.8.3 scheduled wakeup requests

get sched spinlock TODO says who?

test if process still alive - MISSING

if so, and rqpid still exists, increment astcnt - MISSING

if not deallocate tqe - MISSING

call sch_wake to wake it up

if no repeat, do cleanup - MISSING

release sched spinlock TODO says who?

if repeat add tqe delta to tqe time, and do instimq

acquire both TIMER and HWCLK spinlocks

Definition at line 166 of file timeschdl.c.

References exe_gl_tqfl, exe_gq_1st_time, exe_gq_systime, exe_instimq(), IPL__HWCLK, IPL__TIMER, IPL__TIMERFORK, printtq(), sch_postef(), sch_qast(), sch_qend(), sch_wake(), SPIN_HWCLK, SPIN_SCHED, SPIN_TIMER, _tqe::tqe_b_rqtype, _tqe::tqe_l_fpc, _tqe::tqe_q_time, and vmstimerconf.

void exe_timeout ( void   ) 

regular system job - see 5.2 11.8.2

do sch_swpwake() if appropiate

passed one second uptime

do erl_wake() if appropiate - MISSING

ecc_reenable() - MISSING

scan i/o db etc for timeous

forklock - MISSING

call device timeout routine to restart i/o if needed

forkunlock - MISSING

scan crbs for more timeouts - MISSING

if running monitor... scan data - MISSING

scan fork and wait queue. soon to be implemented - MISSING

scan lock mgr etc to handle deadlock - MISSING practically

call one_sec

4 sch_ravail() - MISSING

Definition at line 97 of file timeschdl.c.

References _ddb::ddb_ps_link, _ddb::ddb_ps_sb, _ddb::ddb_ps_ucb, exe_gl_abstim, exetimeout, ioc_gl_devlist, lck_gq_timoutq, lck_searchdlck(), _sb::sb_t_nodename, sch_one_sec(), sch_swpwake(), _ucb::ucb_l_duetim, _ucb::ucb_l_fpc, _ucb::ucb_l_irp, and _ucb::ucb_l_link.

void printtq ( struct _tqe t  ) 

Definition at line 158 of file timeschdl.c.

References _tqe::tqe_l_tqfl.

Referenced by exe_swtimint().


Variable Documentation

int countme2

int exetimeout = 0

Definition at line 91 of file timeschdl.c.

Referenced by exe_timeout().

spinlock_t i8253_lock

unsigned long last_tsc_low

int mydebug5

Definition at line 95 of file sched.c.

int mydebug6

Definition at line 96 of file sched.c.

Referenced by sch_sched().

int pid0count

int pid1count

int use_tsc

Definition at line 2012 of file system_data_cells.c.

Referenced by exe_swtimint(), and vms_init().

rwlock_t xtime_lock


Generated on Fri Oct 9 10:26:05 2009 for FreeVMS by  doxygen 1.5.5