os.tcl 1.21 KB
#
# Copyright (C) 1998 by the Board of Trustees
#    of Leland Stanford Junior University.
# Copyright (C) 1998 Digital Equipment Corporation
#
# This file is part of the SimOS distribution.
# See LICENSE file for terms of the license.
#

#
# Copyright (C) 1996-1998 by the Board of Trustees
#    of Leland Stanford Junior University.
# 
# This file is part of the SimOS distribution. 
# See LICENSE file for terms of the license. 
#

###
### This file is responsible for raising OS level annotations and tracking
### the current process.
###
###

####
#### init this module
####

FileSourced ntalpha/os.tcl


annotation type osEvent enum {
    startUser   endUser
    startKernel endKernel
    startPal    endPal
    startIdle   endIdle
    startSync   endSync
    switchIn    switchOut
    procstart   procexit   procexec  procwait
}

# must agree with cpus-alpha/alpha-shared/ev5.c
annotation type exc enum {
    reset mchk arith interrupt ndtb_miss pdtb_miss unalign dtb_fault itb_miss itb_acv opdec fen pal
}

proc inUserMode {} {
    global IPR
    set IPR_PS 0x10f
    set PS $IPR(0x10f)
    return [expr ($PS & 24) != 0]
}

set PROCESS($CPU) none
set PID($CPU) none

####
#### the annotations 
####

##
## process and idle tracking
##