diff options
author | Dana Robinson <43805+derobins@users.noreply.github.com> | 2023-09-05 21:52:30 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-05 21:52:30 (GMT) |
commit | 8253ab9ebf6a082dc07eb931f27b169d6a45d577 (patch) | |
tree | 47630856491e54f5d28e1608ffa5e2f976dc9c95 /src/H5FDsubfiling/H5FDioc_threads.c | |
parent | 920869796031ed4ee9c1fbea8aaccda3592a88b3 (diff) | |
download | hdf5-8253ab9ebf6a082dc07eb931f27b169d6a45d577.zip hdf5-8253ab9ebf6a082dc07eb931f27b169d6a45d577.tar.gz hdf5-8253ab9ebf6a082dc07eb931f27b169d6a45d577.tar.bz2 |
Convert hbool_t --> bool in src (#3496)
* hbool_t --> bool in src
* Does not remove TRUE/FALSE
* Public header files are unchanged
* Public API calls are unchanged
* TRUE/FALSE --> true/false in src
* Add deprecation notice for hbool_t
Diffstat (limited to 'src/H5FDsubfiling/H5FDioc_threads.c')
-rw-r--r-- | src/H5FDsubfiling/H5FDioc_threads.c | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/src/H5FDsubfiling/H5FDioc_threads.c b/src/H5FDsubfiling/H5FDioc_threads.c index cb3458e..98dd00b 100644 --- a/src/H5FDsubfiling/H5FDioc_threads.c +++ b/src/H5FDsubfiling/H5FDioc_threads.c @@ -85,7 +85,7 @@ static int ioc_file_report_eof(sf_work_request_t *msg, MPI_Comm comm); static ioc_io_queue_entry_t *ioc_io_queue_alloc_entry(void); static void ioc_io_queue_complete_entry(ioc_data_t *ioc_data, ioc_io_queue_entry_t *entry_ptr); -static void ioc_io_queue_dispatch_eligible_entries(ioc_data_t *ioc_data, hbool_t try_lock); +static void ioc_io_queue_dispatch_eligible_entries(ioc_data_t *ioc_data, bool try_lock); static void ioc_io_queue_free_entry(ioc_io_queue_entry_t *q_entry_ptr); static void ioc_io_queue_add_entry(ioc_data_t *ioc_data, sf_work_request_t *wk_req_ptr); @@ -654,7 +654,7 @@ ioc_file_queue_write_indep(sf_work_request_t *msg, int ioc_idx, int source, MPI_ { subfiling_context_t *sf_context = NULL; MPI_Status msg_status; - hbool_t send_nack = FALSE; + bool send_nack = false; int64_t file_context_id; int64_t data_size; int64_t file_offset; @@ -686,7 +686,7 @@ ioc_file_queue_write_indep(sf_work_request_t *msg, int ioc_idx, int source, MPI_ subfile_idx = msg->header[2]; if (data_size < 0) { - send_nack = TRUE; + send_nack = true; H5_SUBFILING_GOTO_ERROR(H5E_IO, H5E_BADVALUE, -1, "invalid data size for write"); } @@ -719,7 +719,7 @@ ioc_file_queue_write_indep(sf_work_request_t *msg, int ioc_idx, int source, MPI_ /* Allocate space to receive data sent from the client */ if (NULL == (recv_buf = malloc((size_t)data_size))) { - send_nack = TRUE; + send_nack = true; H5_SUBFILING_GOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, -1, "couldn't allocate receive buffer for data"); } @@ -839,9 +839,9 @@ static int ioc_file_queue_read_indep(sf_work_request_t *msg, int ioc_idx, int source, MPI_Comm comm, uint32_t counter) { subfiling_context_t *sf_context = NULL; - hbool_t send_empty_buf = TRUE; - hbool_t send_nack = FALSE; - hbool_t need_data_tag = FALSE; + bool send_empty_buf = true; + bool send_nack = false; + bool need_data_tag = false; int64_t file_context_id; int64_t data_size; int64_t file_offset; @@ -886,8 +886,8 @@ ioc_file_queue_read_indep(sf_work_request_t *msg, int ioc_idx, int source, MPI_C if (data_size < 0) { if (need_data_tag) { - send_nack = TRUE; - send_empty_buf = FALSE; + send_nack = true; + send_empty_buf = false; } H5_SUBFILING_GOTO_ERROR(H5E_IO, H5E_BADVALUE, -1, "invalid data size for read"); } @@ -913,8 +913,8 @@ ioc_file_queue_read_indep(sf_work_request_t *msg, int ioc_idx, int source, MPI_C /* Allocate space to send data read from file to client */ if (NULL == (send_buf = malloc((size_t)data_size))) { if (need_data_tag) { - send_nack = TRUE; - send_empty_buf = FALSE; + send_nack = true; + send_empty_buf = false; } H5_SUBFILING_GOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, -1, "couldn't allocate send buffer for data"); } @@ -934,7 +934,7 @@ ioc_file_queue_read_indep(sf_work_request_t *msg, int ioc_idx, int source, MPI_C send_tag += IO_TAG_BASE; if (send_ack_to_client(send_tag, source, ioc_idx, READ_INDEP_ACK, comm) < 0) { - send_empty_buf = FALSE; + send_empty_buf = false; H5_SUBFILING_GOTO_ERROR(H5E_IO, H5E_READERROR, -1, "couldn't send ACK to client"); } } @@ -951,7 +951,7 @@ ioc_file_queue_read_indep(sf_work_request_t *msg, int ioc_idx, int source, MPI_C read_ret); } - send_empty_buf = FALSE; + send_empty_buf = false; /* Send read data to the client */ H5_CHECK_OVERFLOW(data_size, int64_t, int); @@ -1251,7 +1251,7 @@ ioc_io_queue_alloc_entry(void) q_entry_ptr->magic = H5FD_IOC__IO_Q_ENTRY_MAGIC; q_entry_ptr->next = NULL; q_entry_ptr->prev = NULL; - q_entry_ptr->in_progress = FALSE; + q_entry_ptr->in_progress = false; q_entry_ptr->counter = 0; /* will memcpy the wk_req field, so don't bother to initialize */ @@ -1414,9 +1414,9 @@ ioc_io_queue_add_entry(ioc_data_t *ioc_data, sf_work_request_t *wk_req_ptr) * can become O(N**2) in the worst case. */ static void -ioc_io_queue_dispatch_eligible_entries(ioc_data_t *ioc_data, hbool_t try_lock) +ioc_io_queue_dispatch_eligible_entries(ioc_data_t *ioc_data, bool try_lock) { - hbool_t conflict_detected; + bool conflict_detected; int64_t entry_offset; int64_t entry_len; int64_t scan_offset; @@ -1462,7 +1462,7 @@ ioc_io_queue_dispatch_eligible_entries(ioc_data_t *ioc_data, hbool_t try_lock) entry_offset = entry_ptr->wk_req.header[1]; entry_len = entry_ptr->wk_req.header[0]; - conflict_detected = FALSE; + conflict_detected = false; scan_ptr = entry_ptr->prev; @@ -1497,7 +1497,7 @@ ioc_io_queue_dispatch_eligible_entries(ioc_data_t *ioc_data, hbool_t try_lock) /* TODO: update this if statement when we add collective I/O */ if ((entry_ptr->wk_req.tag != READ_INDEP) || (scan_ptr->wk_req.tag != READ_INDEP)) { - conflict_detected = TRUE; + conflict_detected = true; } } @@ -1509,7 +1509,7 @@ ioc_io_queue_dispatch_eligible_entries(ioc_data_t *ioc_data, hbool_t try_lock) assert(scan_ptr == NULL); assert(!entry_ptr->in_progress); - entry_ptr->in_progress = TRUE; + entry_ptr->in_progress = true; assert(ioc_data->io_queue.num_pending > 0); |