diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2007-07-16 16:48:14 +0300 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2007-07-16 16:48:14 +0300 |
commit | 2cfd3012bfcb5c5c61bbaf662ef084e0ab789d79 (patch) | |
tree | e12ee52087506ac8c7a5eee83b17497d98df2d40 /db/dbinc/qam.h | |
parent | b754fe19fd387ca5fe8e7c00ddaa25c898fa192f (diff) | |
download | rpm-2cfd3012bfcb5c5c61bbaf662ef084e0ab789d79.tar.gz rpm-2cfd3012bfcb5c5c61bbaf662ef084e0ab789d79.tar.bz2 rpm-2cfd3012bfcb5c5c61bbaf662ef084e0ab789d79.zip |
Update internal BDB to version 4.5.20
Diffstat (limited to 'db/dbinc/qam.h')
-rw-r--r-- | db/dbinc/qam.h | 46 |
1 files changed, 25 insertions, 21 deletions
diff --git a/db/dbinc/qam.h b/db/dbinc/qam.h index 43910d01d..b76c92cd2 100644 --- a/db/dbinc/qam.h +++ b/db/dbinc/qam.h @@ -1,15 +1,19 @@ /*- * See the file LICENSE for redistribution information. * - * Copyright (c) 1999-2004 - * Sleepycat Software. All rights reserved. + * Copyright (c) 1999-2006 + * Oracle Corporation. All rights reserved. * - * $Id: qam.h,v 11.49 2004/09/17 22:00:27 mjc Exp $ + * $Id: qam.h,v 12.9 2006/08/24 14:45:29 bostic Exp $ */ #ifndef _DB_QAM_H_ #define _DB_QAM_H_ +#if defined(__cplusplus) +extern "C" { +#endif + /* * QAM data elements: a status field and the data. */ @@ -69,8 +73,9 @@ struct __queue { }; /* Format for queue extent names. */ -#define QUEUE_EXTENT "%s%c__dbq.%s.%d" -#define QUEUE_EXTENT_HEAD "__dbq.%s." +#define QUEUE_EXTENT "%s%c__dbq.%s.%d" +#define QUEUE_EXTENT_HEAD "__dbq.%s." +#define QUEUE_EXTENT_PREFIX "__dbq." typedef struct __qam_filelist { DB_MPOOLFILE *mpf; @@ -119,16 +124,16 @@ typedef struct __qam_filelist { ((QUEUE *)(dbp)->q_internal)->re_len, sizeof(u_int32_t)) * index)))) #define QAM_AFTER_CURRENT(meta, recno) \ - ((recno) > (meta)->cur_recno && \ + ((recno) >= (meta)->cur_recno && \ ((meta)->first_recno <= (meta)->cur_recno || \ ((recno) < (meta)->first_recno && \ (recno) - (meta)->cur_recno < (meta)->first_recno - (recno)))) #define QAM_BEFORE_FIRST(meta, recno) \ ((recno) < (meta)->first_recno && \ - ((meta->first_recno <= (meta)->cur_recno || \ + ((meta)->first_recno <= (meta)->cur_recno || \ ((recno) > (meta)->cur_recno && \ - (recno) - (meta)->cur_recno > (meta)->first_recno - (recno))))) + (recno) - (meta)->cur_recno > (meta)->first_recno - (recno)))) #define QAM_NOT_VALID(meta, recno) \ (recno == RECNO_OOB || \ @@ -141,18 +146,10 @@ typedef struct __qam_filelist { #define QAM_SETCUR 0x02 #define QAM_TRUNCATE 0x04 -/* - * Parameter to __qam_position. - */ -typedef enum { - QAM_READ, - QAM_WRITE, - QAM_CONSUME -} qam_position_mode; - typedef enum { QAM_PROBE_GET, QAM_PROBE_PUT, + QAM_PROBE_DIRTY, QAM_PROBE_MPF } qam_probe_mode; @@ -165,11 +162,18 @@ typedef enum { QAM_NAME_REMOVE } qam_name_op; -#define __qam_fget(dbp, pgnoaddr, flags, addrp) \ - __qam_fprobe(dbp, *pgnoaddr, addrp, QAM_PROBE_GET, flags) +#define __qam_fget(dbp, pgnoaddr, lsnp, flags, addrp) \ + __qam_fprobe(dbp, *pgnoaddr, lsnp, addrp, QAM_PROBE_GET, flags) + +#define __qam_fput(dbp, pgno, addrp, flags) \ + __qam_fprobe(dbp, pgno, NULL, addrp, QAM_PROBE_PUT, flags) + +#define __qam_dirty(dbp, pgno, pagep, lsnp, flags) \ + __qam_fprobe(dbp, pgno, lsnp, pagep, QAM_PROBE_DIRTY, flags) -#define __qam_fput(dbp, pageno, addrp, flags) \ - __qam_fprobe(dbp, pageno, addrp, QAM_PROBE_PUT, flags) +#if defined(__cplusplus) +} +#endif #include "dbinc_auto/qam_auto.h" #include "dbinc_auto/qam_ext.h" |