Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document that fileno is the same for all handles #3965

Merged
merged 2 commits into from
Jan 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/H5Fpublic.h
Original file line number Diff line number Diff line change
Expand Up @@ -740,6 +740,13 @@ H5_DLL herr_t H5Fget_intent(hid_t file_id, unsigned *intent);
* file identifier \p file_id and the pointer \p fnumber to the file
* number.
*
* This file number is the same for all open instances of the same
* file, as long as 1. The active VFD implements the file comparison operator,
* and 2. The current filesystem is able to determine if the same file is opened more
* than once. If these conditions are not met, it is the application's
* responsibility to avoid opening multiple handles into the same file,
* which results in undefined behavior.
*
* \since 1.12.0
*
*/
Expand Down
22 changes: 12 additions & 10 deletions src/H5Opublic.h
Original file line number Diff line number Diff line change
Expand Up @@ -143,15 +143,16 @@ typedef struct H5O_hdr_info_t {
* (For H5Oget_info(), H5Oget_info_by_name(), H5Oget_info_by_idx() version 3)
*/
typedef struct H5O_info2_t {
unsigned long fileno; /**< File number that object is located in */
H5O_token_t token; /**< Token representing the object */
H5O_type_t type; /**< Basic object type (group, dataset, etc.) */
unsigned rc; /**< Reference count of object */
time_t atime; /**< Access time */
time_t mtime; /**< Modification time */
time_t ctime; /**< Change time */
time_t btime; /**< Birth time */
hsize_t num_attrs; /**< Number of attributes attached to object */
unsigned long
fileno; /**< File number that object is located in. Constant across multiple opens of the same file */
H5O_token_t token; /**< Token representing the object */
H5O_type_t type; /**< Basic object type (group, dataset, etc.) */
unsigned rc; /**< Reference count of object */
time_t atime; /**< Access time */
time_t mtime; /**< Modification time */
time_t ctime; /**< Change time */
time_t btime; /**< Birth time */
hsize_t num_attrs; /**< Number of attributes attached to object */
} H5O_info2_t;
//! <!-- [H5O_info2_t_snip] -->

Expand Down Expand Up @@ -1717,7 +1718,8 @@ typedef struct H5O_stat_t {
* H5Oget_info_by_idx() versions 1 & 2.)
*/
typedef struct H5O_info1_t {
unsigned long fileno; /**< File number that object is located in */
unsigned long
fileno; /**< File number that object is located in. Constant across multiple opens of the same file */
haddr_t addr; /**< Object address in file */
H5O_type_t type; /**< Basic object type (group, dataset, etc.) */
unsigned rc; /**< Reference count of object */
Expand Down
Loading