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

📄 rf_types.h

📁 RAIDFrame是个非常好的磁盘阵列RAID仿真工具
💻 H
📖 第 1 页 / 共 2 页
字号:
/* * rf_types.h *//* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. * * Author: Jim Zelenka * * Permission to use, copy, modify and distribute this software and * its documentation is hereby granted, provided that both the copyright * notice and this permission notice appear in all copies of the * software, derivative works or modified versions, and any portions * thereof, and that both notices appear in supporting documentation. * * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" * CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. * * Carnegie Mellon requests users of this software to return to * *  Software Distribution Coordinator  or  Software.Distribution@CS.CMU.EDU *  School of Computer Science *  Carnegie Mellon University *  Pittsburgh PA 15213-3890 * * any improvements or extensions that they make and grant Carnegie the * rights to redistribute these changes. *//*********************************************************** * * rf_types.h -- standard types for RAIDframe * ***********************************************************//* * $Locker:  $ * $Log: rf_types.h,v $ * Revision 1.35  1996/08/09  18:48:29  jimz * correct mips definition * * Revision 1.34  1996/08/07  22:50:14  jimz * monkey with linux includes to get a good compile * * Revision 1.33  1996/08/07  21:09:28  jimz * add SGI mips stuff (note: 64-bit stuff may be wrong, I didn't have * a machine to test on) * * Revision 1.32  1996/08/06  22:24:27  jimz * add LINUX_I386 * * Revision 1.31  1996/07/31  16:30:12  jimz * move in RF_LONGSHIFT * * Revision 1.30  1996/07/30  04:51:58  jimz * ultrix port * * Revision 1.29  1996/07/29  16:37:34  jimz * define DEC_OSF for osf/1 kernel * * Revision 1.28  1996/07/28  20:31:39  jimz * i386netbsd port * true/false fixup * * Revision 1.27  1996/07/27  23:36:08  jimz * Solaris port of simulator * * Revision 1.26  1996/07/27  18:40:24  jimz * cleanup sweep * * Revision 1.25  1996/07/22  19:52:16  jimz * switched node params to RF_DagParam_t, a union of * a 64-bit int and a void *, for better portability * attempted hpux port, but failed partway through for * lack of a single C compiler capable of compiling all * source files * * Revision 1.24  1996/07/18  22:57:14  jimz * port simulator to AIX * * Revision 1.23  1996/07/15  17:22:18  jimz * nit-pick code cleanup * resolve stdlib problems on DEC OSF * * Revision 1.22  1996/06/11  18:11:57  jimz * add ThreadGroup * * Revision 1.21  1996/06/11  10:58:47  jimz * add RF_ReconDoneProc_t * * Revision 1.20  1996/06/10  14:18:58  jimz * move user, throughput stats into per-array structure * * Revision 1.19  1996/06/10  11:55:47  jimz * Straightened out some per-array/not-per-array distinctions, fixed * a couple bugs related to confusion. Added shutdown lists. Removed * layout shutdown function (now subsumed by shutdown lists). * * Revision 1.18  1996/06/07  21:33:04  jimz * begin using consistent types for sector numbers, * stripe numbers, row+col numbers, recon unit numbers * * Revision 1.17  1996/06/05  19:38:32  jimz * fixed up disk queueing types config * added sstf disk queueing * fixed exit bug on diskthreads (ref-ing bad mem) * * Revision 1.16  1996/06/05  18:06:02  jimz * Major code cleanup. The Great Renaming is now done. * Better modularity. Better typing. Fixed a bunch of * synchronization bugs. Made a lot of global stuff * per-desc or per-array. Removed dead code. * * Revision 1.15  1996/06/03  23:28:26  jimz * more bugfixes * check in tree to sync for IPDS runs with current bugfixes * there still may be a problem with threads in the script test * getting I/Os stuck- not trivially reproducible (runs ~50 times * in a row without getting stuck) * * Revision 1.14  1996/06/02  17:31:48  jimz * Moved a lot of global stuff into array structure, where it belongs. * Fixed up paritylogging, pss modules in this manner. Some general * code cleanup. Removed lots of dead code, some dead files. * * Revision 1.13  1996/05/31  22:26:54  jimz * fix a lot of mapping problems, memory allocation problems * found some weird lock issues, fixed 'em * more code cleanup * * Revision 1.12  1996/05/30  23:22:16  jimz * bugfixes of serialization, timing problems * more cleanup * * Revision 1.11  1996/05/30  11:29:41  jimz * Numerous bug fixes. Stripe lock release code disagreed with the taking code * about when stripes should be locked (I made it consistent: no parity, no lock) * There was a lot of extra serialization of I/Os which I've removed- a lot of * it was to calculate values for the cache code, which is no longer with us. * More types, function, macro cleanup. Added code to properly quiesce the array * on shutdown. Made a lot of stuff array-specific which was (bogusly) general * before. Fixed memory allocation, freeing bugs. * * Revision 1.10  1996/05/27  18:56:37  jimz * more code cleanup * better typing * compiles in all 3 environments * * Revision 1.9  1996/05/24  22:17:04  jimz * continue code + namespace cleanup * typed a bunch of flags * * Revision 1.8  1996/05/24  04:28:55  jimz * release cleanup ckpt * * Revision 1.7  1996/05/24  01:59:45  jimz * another checkpoint in code cleanup for release * time to sync kernel tree * * Revision 1.6  1996/05/23  21:46:35  jimz * checkpoint in code cleanup (release prep) * lots of types, function names have been fixed * * Revision 1.5  1996/05/23  00:33:23  jimz * code cleanup: move all debug decls to rf_options.c, all extern * debug decls to rf_options.h, all debug vars preceded by rf_ * * Revision 1.4  1996/05/18  19:51:34  jimz * major code cleanup- fix syntax, make some types consistent, * add prototypes, clean out dead code, et cetera * * Revision 1.3  1996/05/10  16:22:46  jimz * RF_offset -> RF_Offset * add RF_SectorCount * * Revision 1.2  1996/05/02  14:58:50  jimz * switch to _t for non-base-integral types * * Revision 1.1  1995/12/14  18:36:51  jimz * Initial revision * */#ifndef _RF__RF_TYPES_H_#define _RF__RF_TYPES_H_#include "rf_archs.h"#ifndef KERNEL#ifdef LINUX#include <stdlib.h>#include <sys/types.h>#endif /* LINUX */#include <fcntl.h>#include <stdio.h>#ifdef __osf__/* * The following monkeying is to get around some problems with * conflicting definitions in /usr/include/random.h and /usr/include/stdlib.h * on Digital Unix. They * (1) define the same symbols * (2) differently than one another * (3) also differently from the DU libc sources * This loses, bad. */#include <standards.h>#include <cma.h>#ifdef _OSF_SOURCE#undef _OSF_SOURCE#define _RF_SPANKME#endif /* _OSF_SOURCE */#endif /* __osf__ */#include <stdlib.h>#ifdef __osf__#ifdef _RF_SPANKME#undef _RF_SPANKME#define _OSF_SOURCE#endif /* _RF_SPANKME */#endif /* __osf__ */#include <string.h>#include <unistd.h>#endif /* !KERNEL */#include <sys/errno.h>#include <sys/types.h>#ifdef AIX#include <sys/stream.h>#endif /* AIX */#if defined(hpux) || defined(__hpux)/* * Yeah, we get one of hpux or __hpux, but not both. This is because * HP didn't really want to provide an ANSI C compiler. Apparantly, they * don't like standards. This explains a lot about their API. You might * try using gcc, but you'll discover that it's sufficiently buggy that * it can't even compile the core library. * * Hatred update: c89, the one thing which could both handle prototypes, * and compile /usr/include/sys/timeout.h, can't do 64-bit ints. * * Note: the hpux port is incomplete. Why? Well, because I can't find * a working C compiler. I've tried cc (both with and without -Ae), * c89, and gcc, all with and without -D_HPUX_SOURCE. Sod it. * * -Jim Zelenka, 22 July 1996 */#ifndef hpux#define hpux#endif /* !hpux */#include <sys/hpibio.h>#endif /* hpux || __hpux*/#ifdef sun#ifndef KERNEL#include <errno.h>#endif /* !KERNEL */#endif /* sun */#if defined(OSF) && defined(__alpha) && defined(KERNEL)#ifndef DEC_OSF#define DEC_OSF#endif /* !DEC_OSF */#endif /* OSF && __alpha && KERNEL *//*

⌨️ 快捷键说明

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