directory.h

来自「一个用在mips体系结构中的操作系统」· C头文件 代码 · 共 50 行

H
50
字号
/* * 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.  * */#ifndef DIRECTORY_H#define DIRECTORY_H#ifndef _LANGUAGE_ASSEMBLY#define DIRECTORY_SIZE(_m) ((ADDR2SLINE(MEM_SIZE(_m))) * sizeof( Dir_Entry ))extern Dir_Entry *directory[MAX_MACHINES];  /* used for range checking */extern Dir_Entry *max_directory[MAX_MACHINES];/* Initialize the directory.  It decides what to do */extern void Directory_Init(void);/* MPinUP uses this interface -- no need to lock */void Directory_NoLock_Modify( int cpuNum, PA pAddr, VA vAddr, int state );/* The idea is that you lock a directory entry, do whatever processing *//* you need with the garuntee that any other processor will spin at *//* the directory, then you free the line */extern Dir_Entry Directory_Lock( int cpuNum, PA pAddr, VA vAddr, int state);extern void Directory_Free( int cpuNum, PA pAddr, Dir_Entry dir_ent );/* This eliminates the given processor from the directory *//* Used for replacement hints */void Directory_Eliminate( int cpuNum, PLN pline, unsigned cpu_bit );/* In directory_asm.s for MPinMP */C_LINK int Dir_Lock_Line( Dir_Entry* );#endif#endif

⌨️ 快捷键说明

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