⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 hive.tcl

📁 一个用在mips体系结构中的操作系统
💻 TCL
字号:
## 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. ######### GLOBALS hive.tcl provides:########   RUNNING_HIVE - defined to 1####   numCells - the number of cells we are running with####   cpusPerCell - the number of cpus per cell####   CELL - the current CELL (just like CPU)###### This file is smoke-and-mirrors so the rest of standard.tcl# runs with Hive.## annotation set pc kernel:... {}   turns into a loop over#                                   kernel0, kernel1, ...# symbol x kernel:...   turns into symbol x kernel$CELL#                         where CELL is determined as#                         $CPU / $cpusPerCell## to directly access annotation and symbol after including# this file, use annotation_raw and symbol_raw##### globals##set RUNNING_HIVE 1if { ! [info exists cpusPerCell] } {    set cpusPerCell [expr $PARAM(CPU.Count) / $PARAM(HIVE.NumCells)]}for {set cell 0} {$cell<$PARAM(HIVE.NumCells)} {incr cell} {    symbol load kernel$cell [lindex $kernelNames $cell]}#### special annotation command##rename annotation annotation_rawproc annotation {cmdname args} {    global PARAM    if {$cmdname == "exec"} {        if {[llength $args] == 2} {            annotation_raw exec [lindex $args 0] [lindex $args 1]        } else {            annotation_raw exec [lindex $args 0]        }        return    }    if {$cmdname == "set"} {        set cmdarg [lindex $args 0]        if {($cmdarg=="pc") || ($cmdarg=="pre-pc") || ($cmdarg=="post-pc")} {            set symbexpr [split [lindex $args 1] :]            if {[lindex $symbexpr 0] == "kernel"} {                for {set cell 0} {$cell<$PARAM(HIVE.NumCells)} {incr cell} {                    set symb "kernel$cell:[join [lrange $symbexpr 1 end] :]"                    set args [lreplace $args 1 1 $symb]                    eval annotation_raw set $args                }                return            }        }        eval annotation_raw set $args        return    }    eval annotation_raw $cmdname $args}#### special symbol command##rename symbol symbol_rawproc symbol {cmdname args} {    global PARAM  CELL    if {($cmdname == "read") || ($cmdname == "set") || ($cmdname == "type")} {        set symb [lindex $args 0]        if {[string range $symb 0 6] == "kernel:"} {            set symb "kernel$CELL:[string range $symb 7 end]"        }        if {$cmdname == "set"} {            return [symbol_raw set $symb [lindex $args 1]]        } else {            return [symbol_raw $cmdname $symb]        }    }    eval symbol_raw $cmdname $args}#### Annotations for booting and resetting slave cells.### temporarily moved to hive2.tcl due to bug in tcl compiler# which doesn't invalidate previously cached bindings upon renamesource "hive2.tcl"

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -