~ubuntu-branches/ubuntu/vivid/db/vivid-proposed

« back to all changes in this revision

Viewing changes to dbinc_auto/txn_auto.h

  • Committer: Bazaar Package Importer
  • Author(s): Clint Adams
  • Date: 2010-04-04 09:37:47 UTC
  • mto: This revision was merged to the branch mainline in revision 20.
  • Revision ID: james.westby@ubuntu.com-20100404093747-7x3j05svjdoy8tdi
Tags: upstream-5.0.21
ImportĀ upstreamĀ versionĀ 5.0.21

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
 
3
3
#ifndef __txn_AUTO_H
4
4
#define __txn_AUTO_H
 
5
#include "dbinc/log.h"
5
6
#define DB___txn_regop_42       10
6
7
typedef struct ___txn_regop_42_args {
7
8
        u_int32_t type;
12
13
        DBT     locks;
13
14
} __txn_regop_42_args;
14
15
 
 
16
extern __DB_IMPORT DB_LOG_RECSPEC __txn_regop_42_desc[];
 
17
static inline int __txn_regop_42_read(ENV *env, 
 
18
    void *data, __txn_regop_42_args **arg)
 
19
{
 
20
        *arg = NULL;
 
21
        return (__log_read_record(env, 
 
22
            NULL, NULL, data, __txn_regop_42_desc, sizeof(__txn_regop_42_args), (void**)arg));
 
23
}
15
24
#define DB___txn_regop  10
16
25
typedef struct ___txn_regop_args {
17
26
        u_int32_t type;
23
32
        DBT     locks;
24
33
} __txn_regop_args;
25
34
 
 
35
extern __DB_IMPORT DB_LOG_RECSPEC __txn_regop_desc[];
 
36
static inline int
 
37
__txn_regop_log(ENV *env, DB_TXN *txnp, DB_LSN *ret_lsnp, u_int32_t flags,
 
38
    u_int32_t opcode, int32_t timestamp, u_int32_t envid, const DBT *locks)
 
39
{
 
40
        return (__log_put_record(env, NULL, txnp, ret_lsnp,
 
41
            flags, DB___txn_regop, 0,
 
42
            sizeof(u_int32_t) + sizeof(u_int32_t) + sizeof(DB_LSN) +
 
43
            sizeof(u_int32_t) + sizeof(u_int32_t) + sizeof(u_int32_t) +
 
44
            LOG_DBT_SIZE(locks),
 
45
            __txn_regop_desc,
 
46
            opcode, timestamp, envid, locks));
 
47
}
 
48
 
 
49
static inline int __txn_regop_read(ENV *env, 
 
50
    void *data, __txn_regop_args **arg)
 
51
{
 
52
        *arg = NULL;
 
53
        return (__log_read_record(env, 
 
54
            NULL, NULL, data, __txn_regop_desc, sizeof(__txn_regop_args), (void**)arg));
 
55
}
26
56
#define DB___txn_ckp_42 11
27
57
typedef struct ___txn_ckp_42_args {
28
58
        u_int32_t type;
34
64
        u_int32_t       rep_gen;
35
65
} __txn_ckp_42_args;
36
66
 
 
67
extern __DB_IMPORT DB_LOG_RECSPEC __txn_ckp_42_desc[];
 
68
static inline int __txn_ckp_42_read(ENV *env, 
 
69
    void *data, __txn_ckp_42_args **arg)
 
70
{
 
71
        *arg = NULL;
 
72
        return (__log_read_record(env, 
 
73
            NULL, NULL, data, __txn_ckp_42_desc, sizeof(__txn_ckp_42_args), (void**)arg));
 
74
}
37
75
#define DB___txn_ckp    11
38
76
typedef struct ___txn_ckp_args {
39
77
        u_int32_t type;
46
84
        u_int32_t       spare;
47
85
} __txn_ckp_args;
48
86
 
 
87
extern __DB_IMPORT DB_LOG_RECSPEC __txn_ckp_desc[];
 
88
static inline int
 
89
__txn_ckp_log(ENV *env, DB_TXN *txnp, DB_LSN *ret_lsnp, u_int32_t flags,
 
90
    DB_LSN * ckp_lsn, DB_LSN * last_ckp, int32_t timestamp, u_int32_t envid, u_int32_t spare)
 
91
{
 
92
        return (__log_put_record(env, NULL, txnp, ret_lsnp,
 
93
            flags, DB___txn_ckp, 0,
 
94
            sizeof(u_int32_t) + sizeof(u_int32_t) + sizeof(DB_LSN) +
 
95
            sizeof(*ckp_lsn) + sizeof(*last_ckp) + sizeof(u_int32_t) +
 
96
            sizeof(u_int32_t) + sizeof(u_int32_t),
 
97
            __txn_ckp_desc,
 
98
            ckp_lsn, last_ckp, timestamp, envid, spare));
 
99
}
 
100
 
 
101
static inline int __txn_ckp_read(ENV *env, 
 
102
    void *data, __txn_ckp_args **arg)
 
103
{
 
104
        *arg = NULL;
 
105
        return (__log_read_record(env, 
 
106
            NULL, NULL, data, __txn_ckp_desc, sizeof(__txn_ckp_args), (void**)arg));
 
107
}
49
108
#define DB___txn_child  12
50
109
typedef struct ___txn_child_args {
51
110
        u_int32_t type;
55
114
        DB_LSN  c_lsn;
56
115
} __txn_child_args;
57
116
 
 
117
extern __DB_IMPORT DB_LOG_RECSPEC __txn_child_desc[];
 
118
static inline int
 
119
__txn_child_log(ENV *env, DB_TXN *txnp, DB_LSN *ret_lsnp, u_int32_t flags,
 
120
    u_int32_t child, DB_LSN * c_lsn)
 
121
{
 
122
        return (__log_put_record(env, NULL, txnp, ret_lsnp,
 
123
            flags, DB___txn_child, 0,
 
124
            sizeof(u_int32_t) + sizeof(u_int32_t) + sizeof(DB_LSN) +
 
125
            sizeof(u_int32_t) + sizeof(*c_lsn),
 
126
            __txn_child_desc,
 
127
            child, c_lsn));
 
128
}
 
129
 
 
130
static inline int __txn_child_read(ENV *env, 
 
131
    void *data, __txn_child_args **arg)
 
132
{
 
133
        *arg = NULL;
 
134
        return (__log_read_record(env, 
 
135
            NULL, NULL, data, __txn_child_desc, sizeof(__txn_child_args), (void**)arg));
 
136
}
58
137
#define DB___txn_xa_regop_42    13
59
138
typedef struct ___txn_xa_regop_42_args {
60
139
        u_int32_t type;
69
148
        DBT     locks;
70
149
} __txn_xa_regop_42_args;
71
150
 
 
151
extern __DB_IMPORT DB_LOG_RECSPEC __txn_xa_regop_42_desc[];
 
152
static inline int __txn_xa_regop_42_read(ENV *env, 
 
153
    void *data, __txn_xa_regop_42_args **arg)
 
154
{
 
155
        *arg = NULL;
 
156
        return (__log_read_record(env, 
 
157
            NULL, NULL, data, __txn_xa_regop_42_desc, sizeof(__txn_xa_regop_42_args), (void**)arg));
 
158
}
72
159
#define DB___txn_prepare        13
73
160
typedef struct ___txn_prepare_args {
74
161
        u_int32_t type;
80
167
        DBT     locks;
81
168
} __txn_prepare_args;
82
169
 
 
170
extern __DB_IMPORT DB_LOG_RECSPEC __txn_prepare_desc[];
 
171
static inline int
 
172
__txn_prepare_log(ENV *env, DB_TXN *txnp, DB_LSN *ret_lsnp, u_int32_t flags,
 
173
    u_int32_t opcode, const DBT *gid, DB_LSN * begin_lsn, const DBT *locks)
 
174
{
 
175
        return (__log_put_record(env, NULL, txnp, ret_lsnp,
 
176
            flags, DB___txn_prepare, 0,
 
177
            sizeof(u_int32_t) + sizeof(u_int32_t) + sizeof(DB_LSN) +
 
178
            sizeof(u_int32_t) + LOG_DBT_SIZE(gid) + sizeof(*begin_lsn) +
 
179
            LOG_DBT_SIZE(locks),
 
180
            __txn_prepare_desc,
 
181
            opcode, gid, begin_lsn, locks));
 
182
}
 
183
 
 
184
static inline int __txn_prepare_read(ENV *env, 
 
185
    void *data, __txn_prepare_args **arg)
 
186
{
 
187
        *arg = NULL;
 
188
        return (__log_read_record(env, 
 
189
            NULL, NULL, data, __txn_prepare_desc, sizeof(__txn_prepare_args), (void**)arg));
 
190
}
83
191
#define DB___txn_recycle        14
84
192
typedef struct ___txn_recycle_args {
85
193
        u_int32_t type;
89
197
        u_int32_t       max;
90
198
} __txn_recycle_args;
91
199
 
 
200
extern __DB_IMPORT DB_LOG_RECSPEC __txn_recycle_desc[];
 
201
static inline int
 
202
__txn_recycle_log(ENV *env, DB_TXN *txnp, DB_LSN *ret_lsnp, u_int32_t flags,
 
203
    u_int32_t min, u_int32_t max)
 
204
{
 
205
        return (__log_put_record(env, NULL, txnp, ret_lsnp,
 
206
            flags, DB___txn_recycle, 0,
 
207
            sizeof(u_int32_t) + sizeof(u_int32_t) + sizeof(DB_LSN) +
 
208
            sizeof(u_int32_t) + sizeof(u_int32_t),
 
209
            __txn_recycle_desc,
 
210
            min, max));
 
211
}
 
212
 
 
213
static inline int __txn_recycle_read(ENV *env, 
 
214
    void *data, __txn_recycle_args **arg)
 
215
{
 
216
        *arg = NULL;
 
217
        return (__log_read_record(env, 
 
218
            NULL, NULL, data, __txn_recycle_desc, sizeof(__txn_recycle_args), (void**)arg));
 
219
}
92
220
#endif