diff options
author | Dana Robinson <derobins@hdfgroup.org> | 2021-03-02 04:25:33 (GMT) |
---|---|---|
committer | Dana Robinson <derobins@hdfgroup.org> | 2021-03-02 04:25:33 (GMT) |
commit | 65bf098ee6656f67e78cf1a7aa6ec3f81f867e1f (patch) | |
tree | 17c6617c25869731c3616473512de48d9fdc2fe6 | |
parent | 3d90a076fb7a2faecd6f1bba2d6da42db565d0a7 (diff) | |
download | hdf5-65bf098ee6656f67e78cf1a7aa6ec3f81f867e1f.zip hdf5-65bf098ee6656f67e78cf1a7aa6ec3f81f867e1f.tar.gz hdf5-65bf098ee6656f67e78cf1a7aa6ec3f81f867e1f.tar.bz2 |
Adds HD prefix to POSIX calls in src
-rw-r--r-- | src/H5FDvfd_swmr.c | 20 | ||||
-rw-r--r-- | src/H5Fvfd_swmr.c | 18 | ||||
-rw-r--r-- | src/H5MFsection.c | 4 | ||||
-rw-r--r-- | src/H5PB.c | 10 | ||||
-rw-r--r-- | src/H5VLnative_object.c | 2 |
5 files changed, 27 insertions, 27 deletions
diff --git a/src/H5FDvfd_swmr.c b/src/H5FDvfd_swmr.c index 898adaf..6f06373 100644 --- a/src/H5FDvfd_swmr.c +++ b/src/H5FDvfd_swmr.c @@ -477,7 +477,7 @@ H5FD_vfd_swmr_close(H5FD_t *_file) if (file->hdf5_file_lf != NULL) { if (file->hdf5_file_lf->exc_owner != NULL) { - assert(file->hdf5_file_lf->exc_owner == &file->pub); + HDassert(file->hdf5_file_lf->exc_owner == &file->pub); file->hdf5_file_lf->exc_owner = NULL; } @@ -562,7 +562,7 @@ H5FD_vfd_swmr_dedup(H5FD_t *_self, H5FD_t *_other, hid_t fapl) { H5FD_vfd_swmr_t *self = (H5FD_vfd_swmr_t *)_self; - assert(_self->driver_id == H5FD_VFD_SWMR_g); + HDassert(_self->driver_id == H5FD_VFD_SWMR_g); if (_self->cls == _other->cls) { H5FD_vfd_swmr_t *other = (H5FD_vfd_swmr_t *)_other; @@ -598,7 +598,7 @@ H5FD_vfd_swmr_dedup(H5FD_t *_self, H5FD_t *_other, hid_t fapl) return NULL; } - equal_configs = memcmp(&self->config, config, sizeof(*config)) == 0; + equal_configs = HDmemcmp(&self->config, config, sizeof(*config)) == 0; free(config); @@ -1263,13 +1263,13 @@ H5FD__vfd_swmr_header_deserialize(H5FD_vfd_swmr_t *file, FUNC_ENTER_STATIC /* Set file pointer to the beginning the file */ - if (lseek(file->md_fd, H5FD_MD_HEADER_OFF, SEEK_SET) < 0) { + if (HDlseek(file->md_fd, H5FD_MD_HEADER_OFF, SEEK_SET) < 0) { HGOTO_ERROR(H5E_VFL, H5E_SEEKERROR, FAIL, \ "unable to seek in metadata file"); } /* Read the header */ - nread = read(file->md_fd, image, H5FD_MD_HEADER_SIZE); + nread = HDread(file->md_fd, image, H5FD_MD_HEADER_SIZE); /* Try again if a signal interrupted the read. */ if (nread == -1 && errno == EINTR) @@ -1287,7 +1287,7 @@ H5FD__vfd_swmr_header_deserialize(H5FD_vfd_swmr_t *file, HGOTO_DONE(FALSE); /* Verify magic number */ - if (memcmp(image, H5FD_MD_HEADER_MAGIC, H5_SIZEOF_MAGIC) != 0) + if (HDmemcmp(image, H5FD_MD_HEADER_MAGIC, H5_SIZEOF_MAGIC) != 0) HGOTO_DONE(FALSE); /* Verify stored and computed checksums are equal */ @@ -1371,12 +1371,12 @@ H5FD__vfd_swmr_index_deserialize(const H5FD_vfd_swmr_t *file, } /* We may seek past EOF. That's ok, the read(2) will catch that. */ - if (lseek(file->md_fd, (HDoff_t)md_header->index_offset, SEEK_SET) < 0){ + if (HDlseek(file->md_fd, (HDoff_t)md_header->index_offset, SEEK_SET) < 0){ HGOTO_ERROR(H5E_VFL, H5E_SEEKERROR, FAIL, "unable to seek in metadata file"); } - nread = read(file->md_fd, image, md_header->index_length); + nread = HDread(file->md_fd, image, md_header->index_length); /* Try again if a signal interrupted the read. */ if (nread == -1 && errno == EINTR) @@ -1423,7 +1423,7 @@ H5FD__vfd_swmr_index_deserialize(const H5FD_vfd_swmr_t *file, * read bad magic. It's possible to recover by * re-reading the header. */ - if (memcmp(image, H5FD_MD_INDEX_MAGIC, H5_SIZEOF_MAGIC) != 0) + if (HDmemcmp(image, H5FD_MD_INDEX_MAGIC, H5_SIZEOF_MAGIC) != 0) HGOTO_DONE(FALSE); /* Verify stored and computed checksums are equal */ @@ -1521,7 +1521,7 @@ H5FD_vfd_swmr_get_tick_and_idx(H5FD_t *_file, hbool_t reload_hdr_and_index, H5FD_vfd_swmr_t *file = (H5FD_vfd_swmr_t *)_file; /* VFD SWMR file struct */ herr_t ret_value = SUCCEED; /* Return value */ - assert(index == NULL || num_entries_ptr != NULL); + HDassert(index == NULL || num_entries_ptr != NULL); FUNC_ENTER_NOAPI(FAIL) diff --git a/src/H5Fvfd_swmr.c b/src/H5Fvfd_swmr.c index 555619d..5e11073 100644 --- a/src/H5Fvfd_swmr.c +++ b/src/H5Fvfd_swmr.c @@ -183,7 +183,7 @@ H5F_vfd_swmr_init(H5F_t *f, hbool_t file_create) md_size = (hsize_t)shared->vfd_swmr_config.md_pages_reserved * shared->fs_page_size; - assert(shared->fs_page_size >= H5FD_MD_HEADER_SIZE); + HDassert(shared->fs_page_size >= H5FD_MD_HEADER_SIZE); /* Allocate an entire page from the shadow file for the header. */ if ((hdr_addr = H5MV_alloc(f, shared->fs_page_size)) == HADDR_UNDEF){ @@ -246,7 +246,7 @@ H5F_vfd_swmr_init(H5F_t *f, hbool_t file_create) HGOTO_ERROR(H5E_FILE, H5E_CANTLOAD, FAIL, "unable to load/decode metadata file"); - assert(shared->tick_num != 0); + HDassert(shared->tick_num != 0); vfd_swmr_reader_did_increase_tick_to(shared->tick_num); hlog_fast(tick, "%s first tick %" PRIu64, @@ -349,7 +349,7 @@ H5F_vfd_swmr_close_or_flush(H5F_t *f, hbool_t closing) } hlog_fast(shadow_defrees, "Emptied deferred shadow frees."); - assert(TAILQ_EMPTY(&shared->shadow_defrees)); + HDassert(TAILQ_EMPTY(&shared->shadow_defrees)); } else { /* For file flush */ /* Update end_of_tick */ if (H5F__vfd_swmr_update_end_of_tick_and_tick_num(shared, TRUE) < 0) @@ -441,7 +441,7 @@ H5F_update_vfd_swmr_metadata_file(H5F_t *f, uint32_t num_entries, HDqsort(index, num_entries, sizeof(*index), H5F__idx_entry_cmp); /* Assert that no HDF5 page offsets are duplicated. */ for (i = 1; i < num_entries; i++) - assert(index[i - 1].hdf5_page_offset < index[i].hdf5_page_offset); + HDassert(index[i - 1].hdf5_page_offset < index[i].hdf5_page_offset); } /* For each non-null entry_ptr in the index: @@ -749,8 +749,8 @@ clean_shadow_index(H5F_t *f, uint32_t nentries, if (ie->clean && ie->tick_of_last_flush + max_lag < tick_num) { - assert(!ie->garbage); - assert(ie->entry_ptr == NULL); + HDassert(!ie->garbage); + HDassert(ie->entry_ptr == NULL); hlog_fast(shadow_index_reclaim, "Reclaiming shadow index slot %" PRIu32 @@ -1142,7 +1142,7 @@ H5F_vfd_swmr_reader_end_of_tick(H5F_t *f, bool entering_api) /* This is ok if we're entering the API, but it should * not happen if we're exiting the API. */ - assert(entering_api || tmp_tick_num < + HDassert(entering_api || tmp_tick_num < shared->tick_num + shared->vfd_swmr_config.max_lag); if (!entering_api) { @@ -1244,7 +1244,7 @@ H5F_vfd_swmr_reader_end_of_tick(H5F_t *f, bool entering_api) * case where the new entry is *longer*, because the * extension could overlap with a second entry. */ - assert(oent->length == nent->length); + HDassert(oent->length == nent->length); hlog_fast(shadow_index_update, "shadow page for slot %" PRIu32 " lower page %" PRIu64 @@ -1447,7 +1447,7 @@ H5F_vfd_swmr_update_entry_eot(eot_queue_entry_t *entry) entry->tick_num, (intmax_t)entry->end_of_tick.tv_sec, entry->end_of_tick.tv_nsec); - assert(entry->vfd_swmr_writer == shared->vfd_swmr_writer); + HDassert(entry->vfd_swmr_writer == shared->vfd_swmr_writer); entry->tick_num = shared->tick_num; entry->end_of_tick = shared->end_of_tick; diff --git a/src/H5MFsection.c b/src/H5MFsection.c index 1b9e756..6d23748 100644 --- a/src/H5MFsection.c +++ b/src/H5MFsection.c @@ -829,10 +829,10 @@ H5MF__sect_large_can_merge(const H5FS_section_info_t *_sect1, HDassert(sect2); HDassert(sect1->sect_info.type == sect2->sect_info.type); /* Checks "MERGE_SYM" flag */ if (!H5F_addr_lt(sect1->sect_info.addr, sect2->sect_info.addr)) { - fprintf(stderr, "%s.%d: sect1->sect_info.addr %" PRIuHADDR + HDfprintf(stderr, "%s.%d: sect1->sect_info.addr %" PRIuHADDR ", sect2->sect_info.addr %" PRIuHADDR "\n", __func__, __LINE__, sect1->sect_info.addr, sect2->sect_info.addr); - fprintf(stderr, "%s.%d: sect1->sect_info.size %" PRIuHSIZE + HDfprintf(stderr, "%s.%d: sect1->sect_info.size %" PRIuHSIZE ", sect2->sect_info.size %" PRIuHSIZE "\n", __func__, __LINE__, sect1->sect_info.size, sect2->sect_info.size); HGOTO_ERROR(H5E_RESOURCE, H5E_CANTRELEASE, FAIL, "can't merge") @@ -1515,7 +1515,7 @@ shadow_idx_entry_remove(H5F_shared_t *shared, uint64_t page, bool only_mark) if (shared->mdf_idx_entries_used > i + 1) { const size_t ntocopy = (size_t)(shared->mdf_idx_entries_used - (i + 1)); - memmove(&shared->mdf_idx[i], + HDmemmove(&shared->mdf_idx[i], &shared->mdf_idx[i + 1], ntocopy * sizeof(shared->mdf_idx[i + 1])); } @@ -1629,7 +1629,7 @@ H5PB_remove_entry(H5F_shared_t *shared, haddr_t addr) HGOTO_ERROR(H5E_PAGEBUF, H5E_SYSTEM, FAIL, "forced eviction failed") - assert(!shared->vfd_swmr_writer || vfd_swmr_pageno_to_mdf_idx_entry(shared->mdf_idx, shared->mdf_idx_entries_used, page, false) == NULL); + HDassert(!shared->vfd_swmr_writer || vfd_swmr_pageno_to_mdf_idx_entry(shared->mdf_idx, shared->mdf_idx_entries_used, page, false) == NULL); } done: @@ -2266,7 +2266,7 @@ H5PB_vfd_swmr__update_index(H5F_t *f, "\n\nmax mdf index len (%" PRIu32 ") exceeded.\n\n", shared->mdf_idx_len); HDfprintf(stderr, "tick = %" PRIu64 ".\n", tick_num); - exit(EXIT_FAILURE); + HDexit(EXIT_FAILURE); } ie_ptr = idx + new_index_entry_index; @@ -2305,7 +2305,7 @@ H5PB_vfd_swmr__update_index(H5F_t *f, ie_ptr->entry_ptr = entry->image_ptr; ie_ptr->tick_of_last_change = tick_num; - assert(entry->is_dirty); + HDassert(entry->is_dirty); ie_ptr->clean = false; ie_ptr->tick_of_last_flush = 0; } @@ -4725,7 +4725,7 @@ H5PB__write_meta(H5F_shared_t *shared, H5FD_mem_t type, haddr_t addr, for (iter_page = page + 1; iter_page < last_page; iter_page++) { H5PB__SEARCH_INDEX(pb_ptr, iter_page, overlap, FAIL) - assert(overlap == NULL); + HDassert(overlap == NULL); } if (new_image == NULL) { HGOTO_ERROR(H5E_PAGEBUF, H5E_SYSTEM, FAIL, diff --git a/src/H5VLnative_object.c b/src/H5VLnative_object.c index 8f60ac4..4fdc0b0 100644 --- a/src/H5VLnative_object.c +++ b/src/H5VLnative_object.c @@ -342,7 +342,7 @@ H5VL__native_object_specific(void *obj, const H5VL_loc_params_t *loc_params, H5V /* Lookup object */ case H5VL_OBJECT_LOOKUP: { - H5O_token_t *token = va_arg(arguments, H5O_token_t *); + H5O_token_t *token = HDva_arg(arguments, H5O_token_t *); HDassert(token); |