rf_pqdeg.h revision 1.3 1 /* $NetBSD: rf_pqdeg.h,v 1.3 1999/02/05 00:06:15 oster Exp $ */
2 /*
3 * Copyright (c) 1995 Carnegie-Mellon University.
4 * All rights reserved.
5 *
6 * Author: Daniel Stodolsky
7 *
8 * Permission to use, copy, modify and distribute this software and
9 * its documentation is hereby granted, provided that both the copyright
10 * notice and this permission notice appear in all copies of the
11 * software, derivative works or modified versions, and any portions
12 * thereof, and that both notices appear in supporting documentation.
13 *
14 * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
15 * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND
16 * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
17 *
18 * Carnegie Mellon requests users of this software to return to
19 *
20 * Software Distribution Coordinator or Software.Distribution (at) CS.CMU.EDU
21 * School of Computer Science
22 * Carnegie Mellon University
23 * Pittsburgh PA 15213-3890
24 *
25 * any improvements or extensions that they make and grant Carnegie the
26 * rights to redistribute these changes.
27 */
28
29 #ifndef _RF__RF_PQDEG_H_
30 #define _RF__RF_PQDEG_H_
31
32 #include "rf_types.h"
33
34 #if RF_UTILITY == 0
35 #include "rf_dag.h"
36
37 /* extern decl's of the failure mode PQ functions.
38 * See pddeg.c for nomenclature discussion.
39 */
40
41 /* reads, single failure */
42 RF_CREATE_DAG_FUNC_DECL(rf_PQ_100_CreateReadDAG);
43 /* reads, two failure */
44 RF_CREATE_DAG_FUNC_DECL(rf_PQ_110_CreateReadDAG);
45 RF_CREATE_DAG_FUNC_DECL(rf_PQ_101_CreateReadDAG);
46 RF_CREATE_DAG_FUNC_DECL(rf_PQ_200_CreateReadDAG);
47
48 /* writes, single failure */
49 RF_CREATE_DAG_FUNC_DECL(rf_PQ_100_CreateWriteDAG);
50 RF_CREATE_DAG_FUNC_DECL(rf_PQ_010_CreateSmallWriteDAG);
51 RF_CREATE_DAG_FUNC_DECL(rf_PQ_010_CreateLargeWriteDAG);
52 RF_CREATE_DAG_FUNC_DECL(rf_PQ_001_CreateSmallWriteDAG);
53 RF_CREATE_DAG_FUNC_DECL(rf_PQ_001_CreateLargeWriteDAG);
54
55 /* writes, double failure */
56 RF_CREATE_DAG_FUNC_DECL(rf_PQ_011_CreateWriteDAG);
57 RF_CREATE_DAG_FUNC_DECL(rf_PQ_110_CreateWriteDAG);
58 RF_CREATE_DAG_FUNC_DECL(rf_PQ_101_CreateWriteDAG);
59 RF_CREATE_DAG_FUNC_DECL(rf_PQ_200_CreateWriteDAG);
60 #endif /* RF_UTILITY == 0 */
61
62 typedef RF_uint32 RF_ua32_t[32];
63 typedef RF_uint8 RF_ua1024_t[1024];
64
65 extern RF_ua32_t rf_rn;
66 extern RF_ua32_t rf_qfor[32];
67 #ifndef _KERNEL /* we don't support PQ in the kernel yet, so
68 * don't link in this monster table */
69 extern RF_ua1024_t rf_qinv[29 * 29];
70 #else /* !_KERNEL */
71 extern RF_ua1024_t rf_qinv[1];
72 #endif /* !_KERNEL */
73
74 #endif /* !_RF__RF_PQDEG_H_ */
75