sys/src/astdel.c File Reference

queuing and delivering asts More...

#include <linux/linkage.h>
#include <system_data_cells.h>
#include <ssdef.h>
#include <pridef.h>
#include <cpudef.h>
#include <acbdef.h>
#include <evtdef.h>
#include <statedef.h>
#include <queue.h>
#include <ipldef.h>
#include <ipl.h>
#include <exe_routines.h>
#include <sch_routines.h>
#include <misc_routines.h>
#include <smp_routines.h>
#include <starlet.h>
#include <linux/sched.h>
#include <linux/smp.h>
#include <linux/slab.h>
#include <internals.h>

Go to the source code of this file.

Defines

#define ASTDEBUG
#define MYDEB_AST

Functions

void sch_newlvl (struct _pcb *p)
 compute new astlvl
int sch_qast (unsigned long pid, int priclass, struct _acb *a)
 queuing an ast to a process - see 5.2 7.4
 printast (struct _acb *acb)
asmlinkage void sch_astdel (int dummy)
 delivering an ast - see 5.2 7.5

Variables

int mydebug5
long qast [32 *1024]
long qastc [32] = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }
int astdeb = 0
 execute ast in the right mode - see 5.2 7.5.1
int lastast = 0
int lastastprm = 0
int lastacb = 0
int myacbi = 0
long myacbs [1024]


Detailed Description

queuing and delivering asts

Author:
Roar Thronęs

Roger Tucker

Definition in file astdel.c.


Define Documentation

#define ASTDEBUG

Definition at line 35 of file astdel.c.

#define MYDEB_AST

Definition at line 38 of file astdel.c.


Function Documentation

printast ( struct _acb acb  ) 

Definition at line 168 of file astdel.c.

References _acb::acb_l_pid.

Referenced by sch_astdel().

asmlinkage void sch_astdel ( int  dummy  ) 

delivering an ast - see 5.2 7.5

spinlock sched

empty queue, spurious interrupt, drop spinlock, return

TODO: check if astlvl be 4 or sch_newlvl necessary

remove first acb from queue

test if kernel mode ast

unlock spinlock, lower ipl to 2

dispatch kernel mode ast by simply calling it

on return from the ast just go to start again

if else, an ordinary ast

check if ok privileged mode

spurious interrupt test, is ast enabled

another spurious test, check if astdel already active

setting astact bit

if not ok, spurious interrupt found, reinsert, set new level, unlock and return

check soft_ast_disable - MISSING

if ast is deliverable

check quota bit and return quota - MISSING

store new astlvl values

unlock spinlock, set ipl

maybe run piggyback kernel ast

if neither nodelete nor pkast set, deallocate ast

build arg list on the stack of the ast's access mode

set ipl 0 before kernel mode ast

call ast in kernel mode

TODO: check it these must be here or be moved

clear astatc

compute new astlvl

Definition at line 629 of file astdel.c.

References _pcb, _acb::acb_b_rmod, _acb::acb_l_ast, _acb::acb_l_astprm, _acb::acb_l_kast, ctl_gl_pcb, IPL__ASTDEL, IPL__SYNCH, kfree(), printast(), sch_newlvl(), smp_gl_cpu_data, SPIN_SCHED, and user_spaceable_addr().

void sch_newlvl ( struct _pcb *  p  ) 

compute new astlvl

Parameters:
p pcb

Definition at line 838 of file astdel.c.

References IPL__SYNCH, and SPIN_SCHED.

Referenced by cmod_astexit(), exe_setast(), and sch_astdel().

int sch_qast ( unsigned long  pid,
int  priclass,
struct _acb a 
)

queuing an ast to a process - see 5.2 7.4

Parameters:
pid the process id
priclass priority class
a ast control block

spinlock sched

does the process exist

if nodelete clear deallocate - missing

scan the ast list

TODO: check if sort according to mode

insert ast in the queue

calculate astlvl

choose first and innermost level from queue - MISSING

handle current on same and other cpu - MISSING

handle outswapped - MISSING

unless current process, invoke sch_rse

otherwise make the process computable

TODO: check smp

release spinlock

Definition at line 75 of file astdel.c.

References _pcb, _acb::acb_b_rmod, _acb::acb_l_ast, _acb::acb_l_astqbl, _acb::acb_l_astqfl, _acb::acb_l_kast, _cpu::cpu_l_curpcb, CPU_M_UPDASTSR, ctl_gl_pcb, exe_ipid_to_pcb(), IPL__SYNCH, sch_rse(), smp_gl_cpu_data, smp_send_work(), SPIN_SCHED, SS__NONEXPR, and SS__NORMAL.

Referenced by bufpost(), exe_dclast(), exe_forcex(), exe_qioqxqppkt(), exe_swtimint(), fork_routine(), fork_routine2(), ioc_iopost(), lck_grant_lock(), lock_iosb_kast(), and maybe_blkast().


Variable Documentation

int astdeb = 0

execute ast in the right mode - see 5.2 7.5.1

params on the stack. code residing in user-readable part afterwards call clrast. exe_astret might be here, see 5.2 7.5.3

Definition at line 616 of file astdel.c.

int lastacb = 0

Definition at line 620 of file astdel.c.

int lastast = 0

Definition at line 618 of file astdel.c.

int lastastprm = 0

Definition at line 619 of file astdel.c.

int myacbi = 0

Definition at line 621 of file astdel.c.

long myacbs[1024]

Definition at line 622 of file astdel.c.

int mydebug5

Definition at line 95 of file sched.c.

Referenced by sch_sched().

long qast[32 *1024]

Definition at line 64 of file astdel.c.

long qastc[32] = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }

Definition at line 65 of file astdel.c.


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