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

📄 hive2.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. # hive2.tcl -- this code should be in hive.tcl but a bug# in the alpha tcl compiler requires that it be in another file.## Specifically, the alpha compiler translates names to bindings# when it firsts reads the file but neglects to invalidate the bindings# when the rename occurs.  Therefore using 'annotation' after# the rename in hive.tcl gets the wrong function.if {$PARAM(HIVE.NumCells) > 1} {    proc loadImageHelper {namep start len} {	global kernelNames	# NOTE:	# Hive thinks the kernels are named u0, u1, etc. so we're	# translating here to what the user wishes the kernels to	# be named.	#	set hiveName [symbol read "kernel::(char*)$namep"]	regsub {[^0-9]} $hiveName {} hiveIndex	set kernName [lindex $kernelNames $hiveIndex] 	if {$kernName == ""} {	    console "error: bad kernel $hiveName in loadImageHelper\n"	    exit	}		return [hive loadimage $kernName $start $len]    }    annotation set pc kernel::SimosLoadImage:LoadImageDoit {	# a0 - pointer to image name	# a1 - pointer to start address of range	# a2 - length of range (max. image size)	set v0 [loadImageHelper $a0 $a1 $a2]    }    annotation set pc kernel::SimosLaunchSlave:LaunchSlaveDoit {	# a0 - CPU number of first CPU in slave cell	# a1 - image entry address	# a2 - argv pointer	# a3 - environ pointer (or 0)	set v0 [hive launchslave $a0 $a1 $a2 $a3]    }    annotation set pc kernel::SimosResetCPUs:ResetCPUsDoit {	# a0 - CPU number of first CPU to reset	# a1 - last CPU to reset	set v0 [hive resetcpus $a0 $a1]    }}

⌨️ 快捷键说明

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