3 * This file is subject to the terms and conditions of the GNU General Public
4 * License. See the file "COPYING" in the main directory of this archive
7 * Copyright (C) 2000-2002 Silicon Graphics, Inc. All rights reserved.
15 #define DEF_NAPTICKS 0
17 #define DEF_AUTO_PASSES 1000000
18 #define DEF_STOP_ON_ERROR 1
20 #define DEF_LINECOUNT 2
21 #define DEF_ITER_MSG 0
22 #define DEF_VV 0xffffffff
23 #define DEF_LINEPAD 0x234
27 #define LLSC_MAXCPUS 64
29 #define MAX_LINECOUNT 1024
34 #define uint unsigned int
35 #define ushort unsigned short
36 #define uchar unsigned char
37 #define vint volatile int
38 #define vlong volatile long
40 #define LOCKADDR(i) &linep->lock[(i)]
41 #define LOCK(i) set_lock(LOCKADDR(i), lockpat)
42 #define UNLOCK(i) clr_lock(LOCKADDR(i), lockpat)
43 #define GETLOCK(i) *LOCKADDR(i)
44 #define ZEROLOCK(i) init_lock(LOCKADDR(i))
46 #define CACHEALIGN(a) ((char*)((long)(a) & ~127L))
51 typedef uchar private_t;
57 private_t private[LLSC_MAXCPUS];
64 #define LINEPAD k_linepad
65 #define LINESTRIDE (((sizeof(dataline_t)+CACHELINE-1)/CACHELINE)*CACHELINE + LINEPAD)
71 private_t private[MAX_LINECOUNT];
75 vlong sk_go; /* 0=idle, 1=init, 2=run */
79 long sk_stop_on_error;
88 threadprivate_t *sk_threadprivate[LLSC_MAXCPUS];
91 /* Run state (k_go) constants */
99 /* Threadstate constants */
106 int llsc_main (int cpuid);