summaryrefslogtreecommitdiffstats
path: root/src/H5Fprivate.h
diff options
context:
space:
mode:
authorRobb Matzke <matzke@llnl.gov>1999-07-28 18:25:43 (GMT)
committerRobb Matzke <matzke@llnl.gov>1999-07-28 18:25:43 (GMT)
commite4834c43ce6528308ebd5375bd4c7a0df88af427 (patch)
tree0039040d95cc92fdb197b2902436e32a020a7b6f /src/H5Fprivate.h
parent139688863f191366fe27fbab9654a52285e63c11 (diff)
downloadhdf5-e4834c43ce6528308ebd5375bd4c7a0df88af427.zip
hdf5-e4834c43ce6528308ebd5375bd4c7a0df88af427.tar.gz
hdf5-e4834c43ce6528308ebd5375bd4c7a0df88af427.tar.bz2
[svn-r1548] Changes since 19990727
---------------------- ./src/H5.c [1.3] ./src/H5AC.c [1.3] ./src/H5ACprivate.h [1.3] ./src/H5B.c [1.3] ./src/H5Bprivate.h [1.3] ./src/H5D.c [1.3] ./src/H5F.c [1.3] ./src/H5Farray.c [1.3] ./src/H5Fcore.c [1.3] ./src/H5Ffamily.c [1.3] ./src/H5Fistore.c [1.3] ./src/H5Flow.c [1.3] ./src/H5Fmpio.c [1.3] ./src/H5Fprivate.h [1.3] ./src/H5Fsec2.c [1.3] ./src/H5Fsplit.c [1.3] ./src/H5Fstdio.c [1.3] ./src/H5G.c [1.3] ./src/H5Gent.c [1.3] ./src/H5Gnode.c [1.3] ./src/H5Gprivate.h [1.3] ./src/H5Gstab.c [1.3] ./src/H5HG.c [1.3] ./src/H5HGprivate.h [1.3] ./src/H5HL.c [1.3] ./src/H5HLprivate.h [1.3] ./src/H5MF.c [1.3] ./src/H5MFprivate.h [1.3] ./src/H5O.c [1.3] ./src/H5Oattr.c [1.3] ./src/H5Ocont.c [1.3] ./src/H5Odtype.c [1.3] ./src/H5Oefl.c [1.3] ./src/H5Olayout.c [1.3] ./src/H5Oprivate.h [1.3] ./src/H5Oshared.c [1.3] ./src/H5Ostab.c [1.3] ./src/H5P.c [1.3] ./src/H5R.c [1.3] ./src/H5Smpio.c [1.3] ./src/H5T.c [1.3] ./src/H5Tvlen.c [1.3] ./src/H5private.h [1.3] ./test/dtypes.c [1.3] ./test/gheap.c [1.3] ./test/istore.c [1.3] ./test/lheap.c [1.3] ./test/ohdr.c [1.3] ./tools/h5debug.c [1.3] File addresses (the `haddr_t' type) are passed by value instead of by reference. The type is no longer a struct. This is one of the preliminary changes needed for the Virtual File Layer stuff. ./src/H5Fprivate.h [1.3] ./src/H5Flow.c [1.3] Some address functions were rewritten as macros.
Diffstat (limited to 'src/H5Fprivate.h')
-rw-r--r--src/H5Fprivate.h74
1 files changed, 42 insertions, 32 deletions
diff --git a/src/H5Fprivate.h b/src/H5Fprivate.h
index ae0d0a6..ab5b748 100644
--- a/src/H5Fprivate.h
+++ b/src/H5Fprivate.h
@@ -361,11 +361,11 @@ typedef struct H5F_low_class_t {
herr_t (*close)(struct H5F_low_t *lf,
const H5F_access_t *access_parms);
herr_t (*read)(struct H5F_low_t *lf, const H5F_access_t *access_parms,
- const H5F_xfer_t *xfer_parms, const haddr_t *addr,
+ const H5F_xfer_t *xfer_parms, haddr_t addr,
size_t size, uint8_t *buf);
herr_t (*write)(struct H5F_low_t *lf,
const H5F_access_t *access_parms,
- const H5F_xfer_t *xfer_parms, const haddr_t *addr,
+ const H5F_xfer_t *xfer_parms, haddr_t addr,
size_t size, const uint8_t *buf);
herr_t (*flush)(struct H5F_low_t *lf,
const H5F_access_t *access_parms);
@@ -611,9 +611,9 @@ __DLL__ H5F_t *H5F_open(const char *name, uintn flags,
__DLL__ herr_t H5F_close(H5F_t *f);
__DLL__ herr_t H5F_close_all(void);
__DLL__ herr_t H5F_flush_all(hbool_t invalidate);
-__DLL__ herr_t H5F_debug(H5F_t *f, const haddr_t *addr, FILE * stream,
+__DLL__ herr_t H5F_debug(H5F_t *f, haddr_t addr, FILE * stream,
intn indent, intn fwidth);
-__DLL__ herr_t H5F_istore_debug(H5F_t *f, const haddr_t *addr, FILE * stream,
+__DLL__ herr_t H5F_istore_debug(H5F_t *f, haddr_t addr, FILE * stream,
intn indent, intn fwidth, int ndims);
__DLL__ herr_t H5F_mountpoint(struct H5G_entry_t *find/*in,out*/);
@@ -643,7 +643,7 @@ __DLL__ herr_t H5F_arr_write (H5F_t *f, const struct H5F_xfer_t *xfer,
__DLL__ herr_t H5F_istore_init (H5F_t *f);
__DLL__ herr_t H5F_istore_flush (H5F_t *f, hbool_t preempt);
__DLL__ herr_t H5F_istore_dest (H5F_t *f);
-__DLL__ hsize_t H5F_istore_allocated(H5F_t *f, int ndims, haddr_t *addr);
+__DLL__ hsize_t H5F_istore_allocated(H5F_t *f, int ndims, haddr_t addr);
__DLL__ herr_t H5F_istore_stats (H5F_t *f, hbool_t headers);
__DLL__ herr_t H5F_istore_create(H5F_t *f,
struct H5O_layout_t *layout/*in,out*/);
@@ -666,19 +666,19 @@ __DLL__ herr_t H5F_istore_allocate (H5F_t *f,
const struct H5O_pline_t *pline,
const struct H5O_fill_t *fill);
__DLL__ herr_t H5F_istore_dump_btree(H5F_t *f, FILE *stream, int ndims,
- haddr_t *addr);
+ haddr_t addr);
/* Functions that operate on contiguous storage wrt boot block */
-__DLL__ herr_t H5F_block_read(H5F_t *f, const haddr_t *addr, hsize_t size,
+__DLL__ herr_t H5F_block_read(H5F_t *f, haddr_t addr, hsize_t size,
const H5F_xfer_t *xfer_parms, void *buf);
-__DLL__ herr_t H5F_block_write(H5F_t *f, const haddr_t *addr, hsize_t size,
+__DLL__ herr_t H5F_block_write(H5F_t *f, haddr_t addr, hsize_t size,
const H5F_xfer_t *xfer_parms, const void *buf);
/* Functions that operate directly on low-level files */
__DLL__ const H5F_low_class_t *H5F_low_class (H5F_driver_t driver);
__DLL__ herr_t H5F_low_extend(H5F_low_t *lf, const H5F_access_t *access_parms,
intn op, hsize_t size, haddr_t *addr/*out*/);
-__DLL__ herr_t H5F_low_seteof(H5F_low_t *lf, const haddr_t *addr);
+__DLL__ herr_t H5F_low_seteof(H5F_low_t *lf, haddr_t addr);
__DLL__ intn H5F_low_alloc (H5F_low_t *lf, intn op, hsize_t alignment,
hsize_t threshold, hsize_t size, H5MF_free_t *blk,
haddr_t *addr/*out*/);
@@ -692,35 +692,45 @@ __DLL__ H5F_low_t *H5F_low_close(H5F_low_t *lf,
const H5F_access_t *access_parms);
__DLL__ hsize_t H5F_low_size(H5F_low_t *lf, haddr_t *addr);
__DLL__ herr_t H5F_low_read(H5F_low_t *lf, const H5F_access_t *access_parms,
- const H5F_xfer_t *xfer_parms, const haddr_t *addr,
+ const H5F_xfer_t *xfer_parms, haddr_t addr,
size_t size, uint8_t *buf);
__DLL__ herr_t H5F_low_write(H5F_low_t *lf, const H5F_access_t *access_parms,
- const H5F_xfer_t *xfer_parms, const haddr_t *addr,
+ const H5F_xfer_t *xfer_parms, haddr_t addr,
size_t size, const uint8_t *buf);
__DLL__ herr_t H5F_low_flush(H5F_low_t *lf, const H5F_access_t *access_parms);
-/* Functions that operate on addresses */
-#define H5F_addr_eq(A1,A2) (H5F_addr_cmp(A1,A2)==0)
-#define H5F_addr_ne(A1,A2) (H5F_addr_cmp(A1,A2)!=0)
-#define H5F_addr_lt(A1,A2) (H5F_addr_cmp(A1,A2)<0)
-#define H5F_addr_le(A1,A2) (H5F_addr_cmp(A1,A2)<=0)
-#define H5F_addr_gt(A1,A2) (H5F_addr_cmp(A1,A2)>0)
-#define H5F_addr_ge(A1,A2) (H5F_addr_cmp(A1,A2)>=0)
-
-__DLL__ intn H5F_addr_cmp(const haddr_t *, const haddr_t *);
-__DLL__ htri_t H5F_addr_defined(const haddr_t *);
-__DLL__ void H5F_addr_undef(haddr_t *);
-__DLL__ void H5F_addr_reset(haddr_t *);
-__DLL__ htri_t H5F_addr_zerop(const haddr_t *);
-__DLL__ void H5F_addr_encode(H5F_t *, uint8_t **, const haddr_t *);
-__DLL__ void H5F_addr_decode(H5F_t *, const uint8_t **, haddr_t *);
-__DLL__ void H5F_addr_print(FILE *, const haddr_t *);
-__DLL__ void H5F_addr_pow2(uintn, haddr_t *);
+/* Address-related macros and functions */
+#define H5F_ADDR_UNDEF ((uint64_t)(-1L))
+#define H5F_addr_defined(X) (X!=H5F_ADDR_UNDEF)
+#define H5F_addr_hash(X,M) ((unsigned)((X)%(M)))
+#define H5F_addr_eq(X,Y) ((X)!=H5F_ADDR_UNDEF && \
+ (Y)!=H5F_ADDR_UNDEF && \
+ (X)==(Y))
+#define H5F_addr_ne(X,Y) (!H5F_addr_eq((X),(Y)))
+#define H5F_addr_lt(X,Y) ((X)!=H5F_ADDR_UNDEF && \
+ (Y)!=H5F_ADDR_UNDEF && \
+ (X)<(Y))
+#define H5F_addr_le(X,Y) ((X)!=H5F_ADDR_UNDEF && \
+ (Y)!=H5F_ADDR_UNDEF && \
+ (X)<=(Y))
+#define H5F_addr_gt(X,Y) ((X)!=H5F_ADDR_UNDEF && \
+ (Y)!=H5F_ADDR_UNDEF && \
+ (X)>(Y))
+#define H5F_addr_ge(X,Y) ((X)!=H5F_ADDR_UNDEF && \
+ (Y)!=H5F_ADDR_UNDEF && \
+ (X)>=(Y))
+#define H5F_addr_undef(XP) (*(XP)=H5F_ADDR_UNDEF)
+#define H5F_addr_reset(XP) (*(XP)=0)
+#define H5F_addr_zerop(X) ((X)==0)
__DLL__ void H5F_addr_inc(haddr_t *addr/*in,out*/, hsize_t inc);
-__DLL__ void H5F_addr_adj(haddr_t *addr/*in,out*/, hssize_t adj);
-__DLL__ void H5F_addr_add(haddr_t *, const haddr_t *);
-__DLL__ uintn H5F_addr_hash(const haddr_t *, uintn mod);
-__DLL__ herr_t H5F_addr_pack(H5F_t *f, haddr_t *addr,
+__DLL__ void H5F_addr_encode(H5F_t *, uint8_t**/*in,out*/, haddr_t);
+__DLL__ void H5F_addr_decode(H5F_t *, const uint8_t**/*in,out*/,
+ haddr_t*/*out*/);
+__DLL__ void H5F_addr_pow2(uintn n, haddr_t *addr/*out*/);
+__DLL__ void H5F_addr_add(haddr_t *a1/*in,out*/, haddr_t a2);
+__DLL__ intn H5F_addr_cmp(haddr_t a1, haddr_t a2);
+__DLL__ void H5F_addr_adj(haddr_t *addr/*in,out */, hssize_t adj);
+__DLL__ herr_t H5F_addr_pack(H5F_t UNUSED *f, haddr_t *addr_p/*out*/,
const unsigned long objno[2]);
/* Functions for MPI-IO */