directory.h
1.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
/*
* 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