From 02be089f0c99850da11b0e693235df90f6d08c16 Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Wed, 19 Mar 2003 18:29:23 -0500 Subject: [svn-r6501] Purpose: New Feature Description: Added support for the lock and unlock function calls for file drivers. Only FPHDF5 uses this feature. All of these drivers don't define lock or unlock methods. Platforms tested: Linux, Modi4, Sol Misc. update: --- src/H5FDcore.c | 21 +++++++++++++++---- src/H5FDfamily.c | 21 +++++++++++++++---- src/H5FDgass.c | 21 +++++++++++++++---- src/H5FDlog.c | 21 +++++++++++++++---- src/H5FDmpio.c | 4 +++- src/H5FDmpiposix.c | 4 +++- src/H5FDmulti.c | 21 +++++++++++++++---- src/H5FDsec2.c | 21 +++++++++++++++---- src/H5FDsrb.c | 21 +++++++++++++++---- src/H5FDstdio.c | 21 +++++++++++++++---- src/H5FDstream.c | 59 +++++++++++++++++++++++++++--------------------------- 11 files changed, 172 insertions(+), 63 deletions(-) diff --git a/src/H5FDcore.c b/src/H5FDcore.c index a57dc4d..89cf392 100644 --- a/src/H5FDcore.c +++ b/src/H5FDcore.c @@ -1,7 +1,18 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * Copyright by the Board of Trustees of the University of Illinois. * + * All rights reserved. * + * * + * This file is part of HDF5. The full HDF5 copyright notice, including * + * terms governing use, modification, and redistribution, is contained in * + * the files COPYING and Copyright.html. COPYING can be found at the root * + * of the source code distribution tree; Copyright.html can be found at the * + * root level of an installed copy of the electronic HDF5 document set and * + * is linked from the top-level documents page. It can also be found at * + * http://hdf.ncsa.uiuc.edu/HDF5/doc/Copyright.html. If you do not have * + * access to either file, you may request a copy from hdfhelp@ncsa.uiuc.edu. * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + /* - * Copyright © 1999-2001 NCSA - * All rights reserved. - * * Programmer: Robb Matzke * Tuesday, August 10, 1999 * @@ -117,7 +128,9 @@ static const H5FD_class_t H5FD_core_g = { H5FD_core_read, /*read */ H5FD_core_write, /*write */ H5FD_core_flush, /*flush */ - H5FD_FLMAP_SINGLE, /*fl_map */ + NULL, /*lock */ + NULL, /*unlock */ + H5FD_FLMAP_SINGLE /*fl_map */ }; /* Interface initialization */ diff --git a/src/H5FDfamily.c b/src/H5FDfamily.c index f181582..0b14304 100644 --- a/src/H5FDfamily.c +++ b/src/H5FDfamily.c @@ -1,7 +1,18 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * Copyright by the Board of Trustees of the University of Illinois. * + * All rights reserved. * + * * + * This file is part of HDF5. The full HDF5 copyright notice, including * + * terms governing use, modification, and redistribution, is contained in * + * the files COPYING and Copyright.html. COPYING can be found at the root * + * of the source code distribution tree; Copyright.html can be found at the * + * root level of an installed copy of the electronic HDF5 document set and * + * is linked from the top-level documents page. It can also be found at * + * http://hdf.ncsa.uiuc.edu/HDF5/doc/Copyright.html. If you do not have * + * access to either file, you may request a copy from hdfhelp@ncsa.uiuc.edu. * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + /* - * Copyright (C) 1997-2001 NCSA - * All rights reserved. - * * Programmer: Robb Matzke * Monday, November 10, 1997 * @@ -112,7 +123,9 @@ static const H5FD_class_t H5FD_family_g = { H5FD_family_read, /*read */ H5FD_family_write, /*write */ H5FD_family_flush, /*flush */ - H5FD_FLMAP_SINGLE, /*fl_map */ + NULL, /*lock */ + NULL, /*unlock */ + H5FD_FLMAP_SINGLE /*fl_map */ }; /* Interface initialization */ diff --git a/src/H5FDgass.c b/src/H5FDgass.c index 0ea1668..dbbc249 100644 --- a/src/H5FDgass.c +++ b/src/H5FDgass.c @@ -1,7 +1,18 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * Copyright by the Board of Trustees of the University of Illinois. * + * All rights reserved. * + * * + * This file is part of HDF5. The full HDF5 copyright notice, including * + * terms governing use, modification, and redistribution, is contained in * + * the files COPYING and Copyright.html. COPYING can be found at the root * + * of the source code distribution tree; Copyright.html can be found at the * + * root level of an installed copy of the electronic HDF5 document set and * + * is linked from the top-level documents page. It can also be found at * + * http://hdf.ncsa.uiuc.edu/HDF5/doc/Copyright.html. If you do not have * + * access to either file, you may request a copy from hdfhelp@ncsa.uiuc.edu. * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + /* - * Copyright © 1999-2001 NCSA - * All rights reserved. - * * Programmer: Saurabh Bagchi (bagchi@uiuc.edu) * Thursday, August 12 -Tuesday, August 17, 1999 * @@ -153,7 +164,9 @@ static const H5FD_class_t H5FD_gass_g = { H5FD_gass_read, /*read */ H5FD_gass_write, /*write */ NULL, /*flush */ - H5FD_FLMAP_SINGLE, /*fl_map */ + NULL, /*lock */ + NULL, /*unlock */ + H5FD_FLMAP_SINGLE /*fl_map */ }; /* Interface initialization */ diff --git a/src/H5FDlog.c b/src/H5FDlog.c index 584f4af..b8722f4 100644 --- a/src/H5FDlog.c +++ b/src/H5FDlog.c @@ -1,7 +1,18 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * Copyright by the Board of Trustees of the University of Illinois. * + * All rights reserved. * + * * + * This file is part of HDF5. The full HDF5 copyright notice, including * + * terms governing use, modification, and redistribution, is contained in * + * the files COPYING and Copyright.html. COPYING can be found at the root * + * of the source code distribution tree; Copyright.html can be found at the * + * root level of an installed copy of the electronic HDF5 document set and * + * is linked from the top-level documents page. It can also be found at * + * http://hdf.ncsa.uiuc.edu/HDF5/doc/Copyright.html. If you do not have * + * access to either file, you may request a copy from hdfhelp@ncsa.uiuc.edu. * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + /* - * Copyright © 2000-2001 NCSA - * All rights reserved. - * * Programmer: Quincey Koziol * Monday, April 17, 2000 * @@ -217,7 +228,9 @@ static const H5FD_class_t H5FD_log_g = { H5FD_log_read, /*read */ H5FD_log_write, /*write */ H5FD_log_flush, /*flush */ - H5FD_FLMAP_NOLIST, /*fl_map */ + NULL, /*lock */ + NULL, /*unlock */ + H5FD_FLMAP_NOLIST /*fl_map */ }; /* Interface initialization */ diff --git a/src/H5FDmpio.c b/src/H5FDmpio.c index 8036fe5..2f2f8a5 100644 --- a/src/H5FDmpio.c +++ b/src/H5FDmpio.c @@ -120,7 +120,9 @@ static const H5FD_class_t H5FD_mpio_g = { H5FD_mpio_read, /*read */ H5FD_mpio_write, /*write */ H5FD_mpio_flush, /*flush */ - H5FD_FLMAP_SINGLE, /*fl_map */ + NULL, /*lock */ + NULL, /*unlock */ + H5FD_FLMAP_SINGLE /*fl_map */ }; #ifdef H5FDmpio_DEBUG diff --git a/src/H5FDmpiposix.c b/src/H5FDmpiposix.c index 9c826dc..19cb760 100644 --- a/src/H5FDmpiposix.c +++ b/src/H5FDmpiposix.c @@ -214,7 +214,9 @@ static const H5FD_class_t H5FD_mpiposix_g = { H5FD_mpiposix_read, /*read */ H5FD_mpiposix_write, /*write */ H5FD_mpiposix_flush, /*flush */ - H5FD_FLMAP_SINGLE, /*fl_map */ + NULL, /*lock */ + NULL, /*unlock */ + H5FD_FLMAP_SINGLE /*fl_map */ }; /* Global var to allow elimination of redundant metadata writes diff --git a/src/H5FDmulti.c b/src/H5FDmulti.c index c16c43a..3f089a6 100644 --- a/src/H5FDmulti.c +++ b/src/H5FDmulti.c @@ -1,7 +1,18 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * Copyright by the Board of Trustees of the University of Illinois. * + * All rights reserved. * + * * + * This file is part of HDF5. The full HDF5 copyright notice, including * + * terms governing use, modification, and redistribution, is contained in * + * the files COPYING and Copyright.html. COPYING can be found at the root * + * of the source code distribution tree; Copyright.html can be found at the * + * root level of an installed copy of the electronic HDF5 document set and * + * is linked from the top-level documents page. It can also be found at * + * http://hdf.ncsa.uiuc.edu/HDF5/doc/Copyright.html. If you do not have * + * access to either file, you may request a copy from hdfhelp@ncsa.uiuc.edu. * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + /* - * Copyright (C) 1997-2002 NCSA - * All rights reserved. - * * Programmer: Robb Matzke * Monday, November 10, 1997 * @@ -160,7 +171,9 @@ static const H5FD_class_t H5FD_multi_g = { H5FD_multi_read, /*read */ H5FD_multi_write, /*write */ H5FD_multi_flush, /*flush */ - H5FD_FLMAP_DEFAULT, /*fl_map */ + NULL, /*lock */ + NULL, /*unlock */ + H5FD_FLMAP_DEFAULT /*fl_map */ }; diff --git a/src/H5FDsec2.c b/src/H5FDsec2.c index 12ff45c..225da14 100644 --- a/src/H5FDsec2.c +++ b/src/H5FDsec2.c @@ -1,7 +1,18 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * Copyright by the Board of Trustees of the University of Illinois. * + * All rights reserved. * + * * + * This file is part of HDF5. The full HDF5 copyright notice, including * + * terms governing use, modification, and redistribution, is contained in * + * the files COPYING and Copyright.html. COPYING can be found at the root * + * of the source code distribution tree; Copyright.html can be found at the * + * root level of an installed copy of the electronic HDF5 document set and * + * is linked from the top-level documents page. It can also be found at * + * http://hdf.ncsa.uiuc.edu/HDF5/doc/Copyright.html. If you do not have * + * access to either file, you may request a copy from hdfhelp@ncsa.uiuc.edu. * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + /* - * Copyright © 1999-2001 NCSA - * All rights reserved. - * * Programmer: Robb Matzke * Thursday, July 29, 1999 * @@ -172,7 +183,9 @@ static const H5FD_class_t H5FD_sec2_g = { H5FD_sec2_read, /*read */ H5FD_sec2_write, /*write */ H5FD_sec2_flush, /*flush */ - H5FD_FLMAP_SINGLE, /*fl_map */ + NULL, /*lock */ + NULL, /*unlock */ + H5FD_FLMAP_SINGLE /*fl_map */ }; /* Interface initialization */ diff --git a/src/H5FDsrb.c b/src/H5FDsrb.c index 1200f6a..bde1cc4 100644 --- a/src/H5FDsrb.c +++ b/src/H5FDsrb.c @@ -1,7 +1,18 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * Copyright by the Board of Trustees of the University of Illinois. * + * All rights reserved. * + * * + * This file is part of HDF5. The full HDF5 copyright notice, including * + * terms governing use, modification, and redistribution, is contained in * + * the files COPYING and Copyright.html. COPYING can be found at the root * + * of the source code distribution tree; Copyright.html can be found at the * + * root level of an installed copy of the electronic HDF5 document set and * + * is linked from the top-level documents page. It can also be found at * + * http://hdf.ncsa.uiuc.edu/HDF5/doc/Copyright.html. If you do not have * + * access to either file, you may request a copy from hdfhelp@ncsa.uiuc.edu. * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + /* - * Copyright (c) 1999-2001 NCSA - * All rights reserved. - * * Programmer: Raymond Lu * Wednesday, April 12, 2000 * @@ -135,7 +146,9 @@ static const H5FD_class_t H5FD_srb_g = { H5FD_srb_read, /*read */ H5FD_srb_write, /*write */ H5FD_srb_flush, /*flush */ - H5FD_FLMAP_SINGLE, /*fl_map */ + NULL, /*lock */ + NULL, /*unlock */ + H5FD_FLMAP_SINGLE /*fl_map */ }; /* Interface initialization */ diff --git a/src/H5FDstdio.c b/src/H5FDstdio.c index 89cc8ea..83357eb 100644 --- a/src/H5FDstdio.c +++ b/src/H5FDstdio.c @@ -1,7 +1,18 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * Copyright by the Board of Trustees of the University of Illinois. * + * All rights reserved. * + * * + * This file is part of HDF5. The full HDF5 copyright notice, including * + * terms governing use, modification, and redistribution, is contained in * + * the files COPYING and Copyright.html. COPYING can be found at the root * + * of the source code distribution tree; Copyright.html can be found at the * + * root level of an installed copy of the electronic HDF5 document set and * + * is linked from the top-level documents page. It can also be found at * + * http://hdf.ncsa.uiuc.edu/HDF5/doc/Copyright.html. If you do not have * + * access to either file, you may request a copy from hdfhelp@ncsa.uiuc.edu. * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + /* - * Copyright (C) 1999-2002 NCSA - * All rights reserved. - * * Programmer: Robb Matzke * Wednesday, October 22, 1997 * @@ -171,7 +182,9 @@ static const H5FD_class_t H5FD_stdio_g = { H5FD_stdio_read, /*read */ H5FD_stdio_write, /*write */ H5FD_stdio_flush, /*flush */ - H5FD_FLMAP_SINGLE, /*fl_map */ + NULL, /*lock */ + NULL, /*unlock */ + H5FD_FLMAP_SINGLE /*fl_map */ }; diff --git a/src/H5FDstream.c b/src/H5FDstream.c index e010d69..0596fc3 100644 --- a/src/H5FDstream.c +++ b/src/H5FDstream.c @@ -168,35 +168,36 @@ static herr_t H5FD_stream_write (H5FD_t *_stream, H5FD_mem_t type, size_t size, const void *buf); /* The Stream VFD's class information structure */ -static const H5FD_class_t H5FD_stream_g = -{ - "stream", /* name */ - MAXADDR, /* maxaddr */ - H5F_CLOSE_WEAK, /* fc_degree */ - NULL, /* sb_size */ - NULL, /* sb_encode */ - NULL, /* sb_decode */ - sizeof (H5FD_stream_fapl_t), /* fapl_size */ - H5FD_stream_fapl_get, /* fapl_get */ - NULL, /* fapl_copy */ - NULL, /* fapl_free */ - 0, /* dxpl_size */ - NULL, /* dxpl_copy */ - NULL, /* dxpl_free */ - H5FD_stream_open, /* open */ - H5FD_stream_close, /* close */ - NULL, /* cmp */ - H5FD_stream_query, /* query */ - NULL, /* alloc */ - NULL, /* free */ - H5FD_stream_get_eoa, /* get_eoa */ - H5FD_stream_set_eoa, /* set_eoa */ - H5FD_stream_get_eof, /* get_eof */ - H5FD_stream_get_handle, /* get_handle */ - H5FD_stream_read, /* read */ - H5FD_stream_write, /* write */ - H5FD_stream_flush, /* flush */ - H5FD_FLMAP_SINGLE, /* fl_map */ +static const H5FD_class_t H5FD_stream_g = { + "stream", /*name */ + MAXADDR, /*maxaddr */ + H5F_CLOSE_WEAK, /*fc_degree */ + NULL, /*sb_size */ + NULL, /*sb_encode */ + NULL, /*sb_decode */ + sizeof (H5FD_stream_fapl_t), /*fapl_size */ + H5FD_stream_fapl_get, /*fapl_get */ + NULL, /*fapl_copy */ + NULL, /*fapl_free */ + 0, /*dxpl_size */ + NULL, /*dxpl_copy */ + NULL, /*dxpl_free */ + H5FD_stream_open, /*open */ + H5FD_stream_close, /*close */ + NULL, /*cmp */ + H5FD_stream_query, /*query */ + NULL, /*alloc */ + NULL, /*free */ + H5FD_stream_get_eoa, /*get_eoa */ + H5FD_stream_set_eoa, /*set_eoa */ + H5FD_stream_get_eof, /*get_eof */ + H5FD_stream_get_handle, /*get_handle */ + H5FD_stream_read, /*read */ + H5FD_stream_write, /*write */ + H5FD_stream_flush, /*flush */ + NULL, /*lock */ + NULL, /*unlock */ + H5FD_FLMAP_SINGLE /*fl_map */ }; /* Interface initialization */ -- cgit v0.12