~ubuntu-branches/ubuntu/edgy/rpm/edgy

« back to all changes in this revision

Viewing changes to db/include/db_dispatch.h

  • Committer: Bazaar Package Importer
  • Author(s): Joey Hess
  • Date: 2002-01-22 20:56:57 UTC
  • Revision ID: james.westby@ubuntu.com-20020122205657-l74j50mr9z8ofcl5
Tags: upstream-4.0.3
ImportĀ upstreamĀ versionĀ 4.0.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*-
 
2
 * See the file LICENSE for redistribution information.
 
3
 *
 
4
 * Copyright (c) 1996-2001
 
5
 *      Sleepycat Software.  All rights reserved.
 
6
 */
 
7
/*
 
8
 * Copyright (c) 1995, 1996
 
9
 *      The President and Fellows of Harvard University.  All rights reserved.
 
10
 *
 
11
 * Redistribution and use in source and binary forms, with or without
 
12
 * modification, are permitted provided that the following conditions
 
13
 * are met:
 
14
 * 1. Redistributions of source code must retain the above copyright
 
15
 *    notice, this list of conditions and the following disclaimer.
 
16
 * 2. Redistributions in binary form must reproduce the above copyright
 
17
 *    notice, this list of conditions and the following disclaimer in the
 
18
 *    documentation and/or other materials provided with the distribution.
 
19
 * 3. Neither the name of the University nor the names of its contributors
 
20
 *    may be used to endorse or promote products derived from this software
 
21
 *    without specific prior written permission.
 
22
 *
 
23
 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
 
24
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 
25
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 
26
 * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
 
27
 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 
28
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
 
29
 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 
30
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
 
31
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
 
32
 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 
33
 * SUCH DAMAGE.
 
34
 *
 
35
 * $Id: db_dispatch.h,v 11.19 2001/05/03 18:58:48 ubell Exp $
 
36
 */
 
37
 
 
38
#ifndef _DB_DISPATCH_H_
 
39
#define _DB_DISPATCH_H_
 
40
 
 
41
/*
 
42
 * Declarations and typedefs for the list of transaction IDs used during
 
43
 * recovery.  This is a generic list used to pass along whatever information
 
44
 * we need during recovery.
 
45
 */
 
46
struct __db_txnhead {
 
47
        LIST_HEAD(__db_headlink, __db_txnlist) head;
 
48
        u_int32_t maxid;
 
49
        int32_t generation;
 
50
};
 
51
 
 
52
#define TXNLIST_INVALID_ID      0xffffffff
 
53
struct __db_txnlist {
 
54
        db_txnlist_type type;
 
55
        LIST_ENTRY(__db_txnlist) links;
 
56
        union {
 
57
                struct {
 
58
                        u_int32_t txnid;
 
59
                        int32_t generation;
 
60
                        int32_t status;
 
61
                } t;
 
62
                struct {
 
63
#define TXNLIST_FLAG_DELETED    0x1
 
64
#define TXNLIST_FLAG_CLOSED     0x2
 
65
                        u_int32_t flags;
 
66
                        int32_t fileid;
 
67
                        u_int32_t count;
 
68
                        char *fname;
 
69
                } d;
 
70
                struct {
 
71
                        int32_t ntxns;
 
72
                        int32_t maxn;
 
73
                        DB_LSN *lsn_array;
 
74
                } l;
 
75
                struct {
 
76
                        int32_t nentries;
 
77
                        int32_t maxentry;
 
78
                        char *fname;
 
79
                        int32_t fileid;
 
80
                        db_pgno_t *pgno_array;
 
81
                        u_int8_t uid[DB_FILE_ID_LEN];
 
82
                } p;
 
83
        } u;
 
84
};
 
85
 
 
86
/*
 
87
 * Flag value for __db_txnlist_lsnadd. Distinguish whether we are replacing
 
88
 * an entry in the transaction list or adding a new one.
 
89
 */
 
90
 
 
91
#define TXNLIST_NEW     0x1
 
92
 
 
93
#define DB_user_BEGIN           10000
 
94
 
 
95
#endif