]> Kevux Git Server - fll/commitdiff
Progress: Continue re-designing of the memory logic.
authorKevin Day <thekevinday@gmail.com>
Thu, 10 Aug 2023 04:33:16 +0000 (23:33 -0500)
committerKevin Day <thekevinday@gmail.com>
Thu, 10 Aug 2023 04:33:16 +0000 (23:33 -0500)
I did a first pass through the f_thread related memory code.
There could be a second pass through the f_thread, but for now this is good enough.

I spent some time going through the build process and other such code to get unit tests running with the latest progress commits.

Fix mistake in f_file_stream_read() where F_none_eof is returned but F_none should be returned.

Include cleanup commit f6725366474492f1b7baabba7938854f6e6412eb from 0.6 branch.

28 files changed:
build/level_0/settings
build/monolithic/settings
build/stand_alone/fake.config.h
build/stand_alone/fake.settings
level_0/f_console/tests/unit/c/test-console-parameters_delete.c
level_0/f_console/tests/unit/c/test-console-parameters_destroy.c
level_0/f_file/c/file/stream.c
level_0/f_iki/tests/unit/c/test-iki-datas_append.c
level_0/f_iki/tests/unit/c/test-iki-datas_append_all.c
level_0/f_iki/tests/unit/c/test-iki-datass_append.c
level_0/f_iki/tests/unit/c/test-iki-datass_append_all.c
level_0/f_thread/c/thread.c
level_0/f_thread/c/thread/barrier.c
level_0/f_thread/c/thread/barrier_attribute.c
level_0/f_thread/c/thread/condition.c
level_0/f_thread/c/thread/condition_attribute.c
level_0/f_thread/c/thread/private-barrier.c [deleted file]
level_0/f_thread/c/thread/private-barrier.h [deleted file]
level_0/f_thread/c/thread/private-barrier_attribute.c [deleted file]
level_0/f_thread/c/thread/private-barrier_attribute.h [deleted file]
level_0/f_thread/c/thread/private-condition.c [deleted file]
level_0/f_thread/c/thread/private-condition.h [deleted file]
level_0/f_thread/c/thread/private-condition_attribute.c [deleted file]
level_0/f_thread/c/thread/private-condition_attribute.h [deleted file]
level_0/f_thread/data/build/settings
level_0/f_thread/data/build/settings-mocks
level_2/fll_execute/c/execute.c
level_3/iki_read/c/main/iki_read.h

index 5b70fded78d24d155fb9a373221b7eab2eb66e9a..84b32ef23eeba47d462020d62eb06ff2147a9bcb 100644 (file)
@@ -92,7 +92,6 @@ build_sources_library utf/private-string.c
 build_sources_library utf/private-triples.c utf/private-tripless.c
 
 build_sources_library-thread thread.c thread/attribute.c thread/barrier.c thread/barrier_attribute.c thread/condition.c thread/condition_attribute.c thread/id.c thread/key.c thread/lock.c thread/lock_attribute.c thread/mutex.c thread/mutex_attribute.c thread/once.c thread/semaphore.c thread/set.c thread/spin.c
-build_sources_library-thread thread/private-barrier.c thread/private-barrier_attribute.c thread/private-condition.c thread/private-condition_attribute.c
 
 build_sources_headers account.h account/accounts.h account/common.h
 build_sources_headers capability.h capability/common.h
index be2a47c643c0fa6c3f3d0be3802f841c6016d6fb..dff44ad5a0bd005bd57dfbba47e7940da83f5916 100644 (file)
@@ -113,7 +113,6 @@ build_sources_library level_2/print.c
 build_sources_library level_2/program.c level_2/program/common.c level_2/program/print.c level_2/private-program.c
 
 build_sources_library-thread level_0/thread.c level_0/thread/attribute.c level_0/thread/barrier.c level_0/thread/barrier_attribute.c level_0/thread/condition.c level_0/thread/condition_attribute.c level_0/thread/id.c level_0/thread/key.c level_0/thread/lock.c level_0/thread/lock_attribute.c level_0/thread/mutex.c level_0/thread/mutex_attribute.c level_0/thread/once.c level_0/thread/semaphore.c level_0/thread/set.c level_0/thread/spin.c
-build_sources_library-thread level_0/thread/private-barrier.c level_0/thread/private-barrier_attribute.c level_0/thread/private-condition.c level_0/thread/private-condition_attribute.c
 
 build_sources_headers level_0/account.h level_0/account/accounts.h level_0/account/common.h
 build_sources_headers level_0/capability.h level_0/capability/common.h
index 65d65536e749bb903968ebc74d88d35ebbe3a87b..1d824a9a5f1c3829a5362f7ebb316cc04b5f3797 100644 (file)
 #define _di_f_capability_to_name_
 #define _di_f_capability_to_text_
 #define _di_f_capability_user_set_
-#define _di_f_cells_adjust_
-#define _di_f_cells_append_
-#define _di_f_cells_append_all_
-#define _di_f_cells_decimate_by_
-#define _di_f_cells_decrease_by_
-#define _di_f_cells_increase_
-#define _di_f_cells_increase_by_
-#define _di_f_cells_resize_
-#define _di_f_cellss_adjust_
-#define _di_f_cellss_append_
-#define _di_f_cellss_append_all_
-#define _di_f_cellss_decimate_by_
-#define _di_f_cellss_decrease_by_
-#define _di_f_cellss_increase_
-#define _di_f_cellss_increase_by_
-#define _di_f_cellss_resize_
+#define _di_f_cells_adjust_callback_
+#define _di_f_cells_resize_callback_
 #define _di_f_cellss_t_
 #define _di_f_cells_t_
 #define _di_f_cell_t_
 //#define _di_f_file_at_d_
 //#define _di_f_file_clone_
 //#define _di_f_file_close_
+#define _di_f_file_close_id_
 //#define _di_f_file_copy_
 //#define _di_f_file_create_
 #define _di_f_file_create_at_
 #define _di_f_file_rename_at_
 //#define _di_f_file_role_change_
 #define _di_f_file_role_change_at_
-#define _di_f_files_adjust_
-#define _di_f_files_append_
-#define _di_f_files_append_all_
-#define _di_f_files_decimate_by_
-#define _di_f_files_decrease_by_
+#define _di_f_files_adjust_callback_
 #define _di_f_file_seek_
 #define _di_f_file_seeks_d_
 #define _di_f_file_select_
 #define _di_f_file_select_signal_
-#define _di_f_files_increase_
-#define _di_f_files_increase_by_
 //#define _di_f_file_size_
 #define _di_f_file_size_at_
 #define _di_f_file_size_by_id_
-#define _di_f_files_resize_
-#define _di_f_filess_adjust_
-#define _di_f_filess_append_
-#define _di_f_filess_append_all_
-#define _di_f_filess_decimate_by_
-#define _di_f_filess_decrease_by_
-#define _di_f_filess_increase_
-#define _di_f_filess_increase_by_
-#define _di_f_filess_resize_
+#define _di_f_files_resize_callback_
 #define _di_f_filess_t_
 #define _di_f_files_t_
 //#define _di_f_file_stat_
 #define _di_f_file_write_range_
 #define _di_f_file_write_until
 #define _di_f_file_write_until_
-#define _di_f_fll_ids_adjust_
-#define _di_f_fll_ids_append_
-#define _di_f_fll_ids_append_all_
-#define _di_f_fll_ids_decimate_by_
-#define _di_f_fll_ids_decrease_by_
-#define _di_f_fll_ids_increase_
-#define _di_f_fll_ids_increase_by_
-#define _di_f_fll_ids_resize_
-#define _di_f_fll_idss_adjust_
-#define _di_f_fll_idss_append_
-#define _di_f_fll_idss_append_all_
-#define _di_f_fll_idss_decimate_by_
-#define _di_f_fll_idss_decrease_by_
-#define _di_f_fll_idss_increase_
-#define _di_f_fll_idss_increase_by_
-#define _di_f_fll_idss_resize_
+#define _di_f_fll_ids_adjust_callback_
+#define _di_f_fll_ids_resize_callback_
 #define _di_f_fll_idss_t_
 #define _di_f_fll_ids_t_
 #define _di_f_fll_id_t_
 #define _di_f_fss_sets_t_
 //#define _di_f_fss_set_t_
 #define _di_f_fss_simple_packet_d_
+#define _di_f_fss_simple_packet_delete_
+#define _di_f_fss_simple_packet_destroy_
 #define _di_f_fss_simple_packet_identify_
 #define _di_f_fss_simple_packet_ranges_adjust_
 #define _di_f_fss_simple_packet_ranges_append_
 #define _di_f_fss_simple_packet_rangess_t_
 #define _di_f_fss_simple_packet_ranges_t_
 #define _di_f_fss_simple_packet_range_t_
+#define _di_f_fss_simple_packets_adjust_
+#define _di_f_fss_simple_packets_append_
+#define _di_f_fss_simple_packets_append_all_
+#define _di_f_fss_simple_packets_decimate_by_
+#define _di_f_fss_simple_packets_decrease_by_
+#define _di_f_fss_simple_packets_increase_
+#define _di_f_fss_simple_packets_increase_by_
+#define _di_f_fss_simple_packets_resize_
+#define _di_f_fss_simple_packetss_adjust_
+#define _di_f_fss_simple_packetss_append_
+#define _di_f_fss_simple_packetss_append_all_
+#define _di_f_fss_simple_packetss_decimate_by_
+#define _di_f_fss_simple_packetss_decrease_by_
+#define _di_f_fss_simple_packetss_increase_
+#define _di_f_fss_simple_packetss_increase_by_
+#define _di_f_fss_simple_packetss_resize_
+#define _di_f_fss_simple_packetss_t_
+#define _di_f_fss_simple_packets_t_
+#define _di_f_fss_simple_packet_t_
 //#define _di_f_fss_skip_past_delimit_
 //#define _di_f_fss_skip_past_space_
 //#define _di_f_fss_state_flag_e_
 //#define _di_f_iki_vocabulary_0002_define_s_
 //#define _di_f_iki_vocabulary_0002_parameter_s_
 //#define _di_f_iki_vocabulary_0002_s_
-#define _di_f_int128s_adjust_
-#define _di_f_int128s_append_
-#define _di_f_int128s_append_all_
-#define _di_f_int128s_decimate_by_
-#define _di_f_int128s_decrease_by_
-#define _di_f_int128s_increase_
-#define _di_f_int128s_increase_by_
-#define _di_f_int128s_resize_
-#define _di_f_int128ss_adjust_
-#define _di_f_int128ss_append_
-#define _di_f_int128ss_append_all_
-#define _di_f_int128ss_decimate_by_
-#define _di_f_int128ss_decrease_by_
-#define _di_f_int128ss_increase_
-#define _di_f_int128ss_increase_by_
-#define _di_f_int128ss_resize_
+#define _di_f_int128s_adjust_callback_
+#define _di_f_int128s_resize_callback_
 #define _di_f_int128ss_t_
 #define _di_f_int128s_t_
 //#define _di_f_int128_t_
-#define _di_f_int16s_adjust_
-#define _di_f_int16s_append_
-#define _di_f_int16s_append_all_
-#define _di_f_int16s_decimate_by_
-#define _di_f_int16s_decrease_by_
-#define _di_f_int16s_increase_
-#define _di_f_int16s_increase_by_
-#define _di_f_int16s_resize_
-#define _di_f_int16ss_adjust_
-#define _di_f_int16ss_append_
-#define _di_f_int16ss_append_all_
-#define _di_f_int16ss_decimate_by_
-#define _di_f_int16ss_decrease_by_
-#define _di_f_int16ss_increase_
-#define _di_f_int16ss_increase_by_
-#define _di_f_int16ss_resize_
+#define _di_f_int16s_adjust_callback_
+#define _di_f_int16s_resize_callback_
 #define _di_f_int16ss_t_
 #define _di_f_int16s_t_
-#define _di_f_int32s_adjust_
-#define _di_f_int32s_append_
-#define _di_f_int32s_append_all_
-#define _di_f_int32s_decimate_by_
-#define _di_f_int32s_decrease_by_
-#define _di_f_int32s_increase_
-#define _di_f_int32s_increase_by_
-#define _di_f_int32s_resize_
-#define _di_f_int32ss_adjust_
-#define _di_f_int32ss_append_
-#define _di_f_int32ss_append_all_
-#define _di_f_int32ss_decimate_by_
-#define _di_f_int32ss_decrease_by_
-#define _di_f_int32ss_increase_
-#define _di_f_int32ss_increase_by_
-#define _di_f_int32ss_resize_
+#define _di_f_int32s_adjust_callback_
+#define _di_f_int32s_resize_callback_
 #define _di_f_int32ss_t_
 //#define _di_f_int32s_t_
-#define _di_f_int64s_adjust_
-#define _di_f_int64s_append_
-#define _di_f_int64s_append_all_
-#define _di_f_int64s_decimate_by_
-#define _di_f_int64s_decrease_by_
-#define _di_f_int64s_increase_
-#define _di_f_int64s_increase_by_
-#define _di_f_int64s_resize_
-#define _di_f_int64ss_adjust_
-#define _di_f_int64ss_append_
-#define _di_f_int64ss_append_all_
-#define _di_f_int64ss_decimate_by_
-#define _di_f_int64ss_decrease_by_
-#define _di_f_int64ss_increase_
-#define _di_f_int64ss_increase_by_
-#define _di_f_int64ss_resize_
+#define _di_f_int64s_adjust_callback_
+#define _di_f_int64s_resize_callback_
 #define _di_f_int64ss_t_
 #define _di_f_int64s_t_
-#define _di_f_int8s_adjust_
-#define _di_f_int8s_append_
-#define _di_f_int8s_append_all_
-#define _di_f_int8s_decimate_by_
-#define _di_f_int8s_decrease_by_
-#define _di_f_int8s_increase_
-#define _di_f_int8s_increase_by_
-#define _di_f_int8s_resize_
-#define _di_f_int8ss_adjust_
-#define _di_f_int8ss_append_
-#define _di_f_int8ss_append_all_
-#define _di_f_int8ss_decimate_by_
-#define _di_f_int8ss_decrease_by_
-#define _di_f_int8ss_increase_
-#define _di_f_int8ss_increase_by_
-#define _di_f_int8ss_resize_
+#define _di_f_int8s_adjust_callback_
+#define _di_f_int8s_resize_callback_
 #define _di_f_int8ss_t_
 #define _di_f_int8s_t_
-#define _di_f_int8_t_
 //#define _di_fl_control_group_apply_
 //#define _di_fl_conversion_data_base_10_c_
 #define _di_fl_conversion_data_base_12_c_
 //#define _di_fl_print_warning_s_
 #define _di_f_memory_adjust_
 #define _di_f_memory_array_adjust_
+#define _di_f_memory_array_append_
+#define _di_f_memory_array_append_all_
 #define _di_f_memory_array_decimate_by_
 #define _di_f_memory_array_decrease_by_
 //#define _di_f_memory_array_increase_
 //#define _di_f_memory_array_increase_by_
 //#define _di_f_memory_array_resize_
+#define _di_f_memory_arrays_adjust_
+//#define _di_f_memory_arrays_resize_
 //#define _di_f_memory_default_d_
 //#define _di_f_memory_delete_
 #define _di_f_memory_destroy_
 #define _di_f_network_to_host_long_
 #define _di_f_network_to_host_short_
 #define _di_f_network_to_ip_string_
-#define _di_f_number_unsigneds_adjust_
-#define _di_f_number_unsigneds_append_
-#define _di_f_number_unsigneds_append_all_
-#define _di_f_number_unsigneds_decimate_by_
-#define _di_f_number_unsigneds_decrease_by_
-//#define _di_f_number_unsigneds_increase_
-//#define _di_f_number_unsigneds_increase_by_
-//#define _di_f_number_unsigneds_resize_
-#define _di_f_number_unsignedss_adjust_
-#define _di_f_number_unsignedss_append_
-#define _di_f_number_unsignedss_append_all_
-#define _di_f_number_unsignedss_decimate_by_
-#define _di_f_number_unsignedss_decrease_by_
-#define _di_f_number_unsignedss_increase_
-#define _di_f_number_unsignedss_increase_by_
-#define _di_f_number_unsignedss_resize_
+#define _di_f_number_unsigneds_adjust_callback_
+#define _di_f_number_unsigneds_resize_callback_
 #define _di_f_number_unsignedss_t_
 //#define _di_f_number_unsigneds_t_
 #define _di_f_parse_dynamic_partial_fll_identify_
 //#define _di_f_pipe_input_exists_
 #define _di_f_pipe_output_exists_
 //#define _di_f_poll_e_
-#define _di_f_polls_adjust_
-#define _di_f_polls_append_
-#define _di_f_polls_append_all_
-#define _di_f_polls_decimate_by_
-#define _di_f_polls_decrease_by_
-#define _di_f_polls_increase_
-#define _di_f_polls_increase_by_
-#define _di_f_polls_resize_
-#define _di_f_pollss_adjust_
-#define _di_f_pollss_append_
-#define _di_f_pollss_append_all_
-#define _di_f_pollss_decimate_by_
-#define _di_f_pollss_decrease_by_
-#define _di_f_pollss_increase_
-#define _di_f_pollss_increase_by_
-#define _di_f_pollss_resize_
+#define _di_f_polls_adjust_callback_
+#define _di_f_polls_resize_callback_
 #define _di_f_pollss_t_
 #define _di_f_polls_t_
 //#define _di_f_poll_t_
 #define _di_f_socket_write_
 #define _di_f_socket_write_message_
 #define _di_f_socket_write_stream_
-#define _di_f_states_adjust_
-#define _di_f_states_append_
-#define _di_f_states_append_all_
-#define _di_f_states_decimate_by_
-#define _di_f_states_decrease_by_
-#define _di_f_states_increase_
-#define _di_f_states_increase_by_
-#define _di_f_states_resize_
-#define _di_f_statess_adjust_
-#define _di_f_statess_append_
-#define _di_f_statess_append_all_
-#define _di_f_statess_decimate_by_
-#define _di_f_statess_decrease_by_
-#define _di_f_statess_increase_
-#define _di_f_statess_increase_by_
-#define _di_f_statess_resize_
+#define _di_f_states_adjust_callback_
+#define _di_f_states_resize_callback_
 #define _di_f_statess_t_
 #define _di_f_states_t_
 //#define _di_f_state_t_
 //#define _di_f_status_number_e_
 //#define _di_f_status_process_e_
 //#define _di_f_status_return_e_
-#define _di_f_statuss_adjust_
-#define _di_f_statuss_append_
-#define _di_f_statuss_append_all_
-#define _di_f_statuss_decimate_by_
-#define _di_f_statuss_decrease_by_
+#define _di_f_statuss_adjust_callback_
 //#define _di_f_status_signal_e_
-#define _di_f_statuss_increase_
-#define _di_f_statuss_increase_by_
 //#define _di_f_status_socket_e_
-#define _di_f_statuss_resize_
-#define _di_f_statusss_adjust_
-#define _di_f_statusss_append_
-#define _di_f_statusss_append_all_
-#define _di_f_statusss_decimate_by_
-#define _di_f_statusss_decrease_by_
-#define _di_f_statusss_increase_
-#define _di_f_statusss_increase_by_
-#define _di_f_statusss_resize_
+#define _di_f_statuss_resize_callback_
 #define _di_f_statusss_t_
 #define _di_f_statuss_t_
 //#define _di_f_status_t_
 #define _di_f_thread_attribute_scope_get_
 #define _di_f_thread_attribute_scope_set_
 #define _di_f_thread_attributes_decimate_by_
-#define _di_f_thread_attributes_decrease_
 #define _di_f_thread_attributes_decrease_by_
 #define _di_f_thread_attributes_increase_
 #define _di_f_thread_attributes_increase_by_
 #define _di_f_thread_barrier_attribute_delete_
 #define _di_f_thread_barrier_attributes_adjust_
 #define _di_f_thread_barrier_attributes_decimate_by_
-#define _di_f_thread_barrier_attributes_decrease_
 #define _di_f_thread_barrier_attributes_decrease_by_
 #define _di_f_thread_barrier_attribute_shared_get_
 #define _di_f_thread_barrier_attribute_shared_set_
 #define _di_f_thread_barrier_delete_
 #define _di_f_thread_barriers_adjust_
 #define _di_f_thread_barriers_decimate_by_
-#define _di_f_thread_barriers_decrease_
 #define _di_f_thread_barriers_decrease_by_
 #define _di_f_thread_barriers_increase_
 #define _di_f_thread_barriers_increase_by_
 #define _di_f_thread_condition_attribute_delete_
 #define _di_f_thread_condition_attributes_adjust_
 #define _di_f_thread_condition_attributes_decimate_by_
-#define _di_f_thread_condition_attributes_decrease_
 #define _di_f_thread_condition_attributes_decrease_by_
 #define _di_f_thread_condition_attribute_shared_get_
 #define _di_f_thread_condition_attribute_shared_set_
 #define _di_f_thread_condition_delete_
 #define _di_f_thread_conditions_adjust_
 #define _di_f_thread_conditions_decimate_by_
-#define _di_f_thread_conditions_decrease_
 #define _di_f_thread_conditions_decrease_by_
 #define _di_f_thread_condition_signal_
 #define _di_f_thread_condition_signal_all_
 #define _di_f_thread_key_get_
 #define _di_f_thread_keys_adjust_
 #define _di_f_thread_keys_decimate_by_
-#define _di_f_thread_keys_decrease_
 #define _di_f_thread_keys_decrease_by_
 #define _di_f_thread_key_set_
 #define _di_f_thread_keys_increase_
 #define _di_f_thread_lock_attribute_delete_
 #define _di_f_thread_lock_attributes_adjust_
 #define _di_f_thread_lock_attributes_decimate_by_
-#define _di_f_thread_lock_attributes_decrease_
 #define _di_f_thread_lock_attributes_decrease_by_
 #define _di_f_thread_lock_attribute_shared_get_
 #define _di_f_thread_lock_attribute_shared_set_
 #define _di_f_thread_lock_read_try_
 #define _di_f_thread_locks_adjust_
 #define _di_f_thread_locks_decimate_by_
-#define _di_f_thread_locks_decrease_
 #define _di_f_thread_locks_decrease_by_
 #define _di_f_thread_locks_increase_
 #define _di_f_thread_locks_increase_by_
 #define _di_f_thread_mutex_attribute_protocol_set_
 #define _di_f_thread_mutex_attributes_adjust_
 #define _di_f_thread_mutex_attributes_decimate_by_
-#define _di_f_thread_mutex_attributes_decrease_
 #define _di_f_thread_mutex_attributes_decrease_by_
 #define _di_f_thread_mutex_attribute_shared_get_
 #define _di_f_thread_mutex_attribute_shared_set_
 #define _di_f_thread_mutex_priority_ceiling_set_
 #define _di_f_thread_mutexs_adjust_
 #define _di_f_thread_mutexs_decimate_by_
-#define _di_f_thread_mutexs_decrease_
 #define _di_f_thread_mutexs_decrease_by_
 #define _di_f_thread_mutexs_increase_
 #define _di_f_thread_mutexs_increase_by_
 #define _di_f_thread_semaphore_lock_try_
 #define _di_f_thread_semaphores_adjust_
 #define _di_f_thread_semaphores_decimate_by_
-#define _di_f_thread_semaphores_decrease_
 #define _di_f_thread_semaphores_decrease_by_
 #define _di_f_thread_semaphores_increase_
 #define _di_f_thread_semaphores_increase_by_
 #define _di_f_thread_semaphore_value_get_
 #define _di_f_thread_sets_adjust_
 #define _di_f_thread_sets_decimate_by_
-#define _di_f_thread_sets_decrease_
 #define _di_f_thread_sets_decrease_by_
 #define _di_f_thread_sets_increase_
 #define _di_f_thread_sets_increase_by_
 #define _di_f_thread_spin_lock_try_
 #define _di_f_thread_spins_adjust_
 #define _di_f_thread_spins_decimate_by_
-#define _di_f_thread_spins_decrease_
 #define _di_f_thread_spins_decrease_by_
 #define _di_f_thread_spins_increase_
 #define _di_f_thread_spins_increase_by_
 //#define _di_f_type_file_flag_d_
 //#define _di_f_type_number_64_t_
 //#define _di_f_type_sizes_d_
-#define _di_f_uint128s_adjust_
-#define _di_f_uint128s_append_
-#define _di_f_uint128s_append_all_
-#define _di_f_uint128s_decimate_by_
-#define _di_f_uint128s_decrease_by_
-#define _di_f_uint128s_increase_
-#define _di_f_uint128s_increase_by_
-#define _di_f_uint128s_resize_
-#define _di_f_uint128ss_adjust_
-#define _di_f_uint128ss_append_
-#define _di_f_uint128ss_append_all_
-#define _di_f_uint128ss_decimate_by_
-#define _di_f_uint128ss_decrease_by_
-#define _di_f_uint128ss_increase_
-#define _di_f_uint128ss_increase_by_
-#define _di_f_uint128ss_resize_
+#define _di_f_uint128s_adjust_callback_
+#define _di_f_uint128s_resize_callback_
 #define _di_f_uint128ss_t_
 #define _di_f_uint128s_t_
-#define _di_f_uint128_t_
-#define _di_f_uint16s_adjust_
-#define _di_f_uint16s_append_
-#define _di_f_uint16s_append_all_
-#define _di_f_uint16s_decimate_by_
-#define _di_f_uint16s_decrease_by_
-#define _di_f_uint16s_increase_
-#define _di_f_uint16s_increase_by_
-#define _di_f_uint16s_resize_
-#define _di_f_uint16ss_adjust_
-#define _di_f_uint16ss_append_
-#define _di_f_uint16ss_append_all_
-#define _di_f_uint16ss_decimate_by_
-#define _di_f_uint16ss_decrease_by_
-#define _di_f_uint16ss_increase_
-#define _di_f_uint16ss_increase_by_
-#define _di_f_uint16ss_resize_
+//#define _di_f_uint128_t_
+#define _di_f_uint16s_adjust_callback_
+#define _di_f_uint16s_resize_callback_
 #define _di_f_uint16ss_t_
 //#define _di_f_uint16s_t_
-#define _di_f_uint32s_adjust_
-#define _di_f_uint32s_append_
-#define _di_f_uint32s_append_all_
-#define _di_f_uint32s_decimate_by_
-#define _di_f_uint32s_decrease_by_
-#define _di_f_uint32s_increase_
-#define _di_f_uint32s_increase_by_
-#define _di_f_uint32s_resize_
-#define _di_f_uint32ss_adjust_
-#define _di_f_uint32ss_append_
-#define _di_f_uint32ss_append_all_
-#define _di_f_uint32ss_decimate_by_
-#define _di_f_uint32ss_decrease_by_
-#define _di_f_uint32ss_increase_
-#define _di_f_uint32ss_increase_by_
-#define _di_f_uint32ss_resize_
+#define _di_f_uint32s_adjust_callback_
+#define _di_f_uint32s_resize_callback_
 #define _di_f_uint32ss_t_
 #define _di_f_uint32s_t_
-#define _di_f_uint64s_adjust_
-#define _di_f_uint64s_append_
-#define _di_f_uint64s_append_all_
-#define _di_f_uint64s_decimate_by_
-#define _di_f_uint64s_decrease_by_
-#define _di_f_uint64s_increase_
-#define _di_f_uint64s_increase_by_
-#define _di_f_uint64s_resize_
-#define _di_f_uint64ss_adjust_
-#define _di_f_uint64ss_append_
-#define _di_f_uint64ss_append_all_
-#define _di_f_uint64ss_decimate_by_
-#define _di_f_uint64ss_decrease_by_
-#define _di_f_uint64ss_increase_
-#define _di_f_uint64ss_increase_by_
-#define _di_f_uint64ss_resize_
+#define _di_f_uint64s_adjust_callback_
+#define _di_f_uint64s_resize_callback_
 #define _di_f_uint64ss_t_
 #define _di_f_uint64s_t_
-#define _di_f_uint8s_adjust_
-#define _di_f_uint8s_append_
-#define _di_f_uint8s_append_all_
-#define _di_f_uint8s_decimate_by_
-#define _di_f_uint8s_decrease_by_
-//#define _di_f_uint8s_increase_
-//#define _di_f_uint8s_increase_by_
-//#define _di_f_uint8s_resize_
-#define _di_f_uint8ss_adjust_
-#define _di_f_uint8ss_append_
-#define _di_f_uint8ss_append_all_
-#define _di_f_uint8ss_decimate_by_
-#define _di_f_uint8ss_decrease_by_
-//#define _di_f_uint8ss_increase_
-#define _di_f_uint8ss_increase_by_
-//#define _di_f_uint8ss_resize_
+#define _di_f_uint8s_adjust_callback_
+//#define _di_f_uint8s_resize_callback_
 //#define _di_f_uint8ss_t_
 //#define _di_f_uint8s_t_
 #define _di_f_utf_buffer_decrement_
 #define _di_f_utf_string_mapss_increase_by_
 #define _di_f_utf_string_mapss_resize_
 #define _di_f_utf_string_mapss_t_
-//#define _di_f_utf_string_maps_t_
-//#define _di_f_utf_string_map_t_
+#define _di_f_utf_string_maps_t_
+#define _di_f_utf_string_map_t_
 #define _di_f_utf_string_mash_
 #define _di_f_utf_string_mash_nulless_
 #define _di_f_utf_string_mish_
index 3420196e2f6b62e9e7c8385efc87563150472cfb..634877bd865c884156eeeeb1bcdecd9ae29f8d5a 100644 (file)
@@ -46,7 +46,7 @@ build_sources_program fll/level_0/fss.c fll/level_0/fss/common.c fll/level_0/fss
 build_sources_program fll/level_0/fss/private-item.c fll/level_0/fss/private-named.c fll/level_0/fss/private-nest.c fll/level_0/fss/private-set.c fll/level_0/fss/private-set_quote.c fll/level_0/fss/private-simple_packet.c
 build_sources_program fll/level_0/iki.c fll/level_0/private-iki.c fll/level_0/iki/common.c fll/level_0/iki/private-data.c fll/level_0/iki/data.c
 build_sources_program fll/level_0/limit.c fll/level_0/limit/set.c fll/level_0/limit/value.c fll/level_0/limit/private-set.c fll/level_0/limit/private-value.c
-build_sources_program fll/level_0/memory.c fll/level_0/memory/array.c
+build_sources_program fll/level_0/memory.c fll/level_0/memory/array.c fll/level_0/memory/arrays.c
 build_sources_program fll/level_0/private-memory.c fll/level_0/memory/private-array.c
 build_sources_program fll/level_0/parse.c fll/level_0/parse/utf.c
 build_sources_program fll/level_0/path.c fll/level_0/private-path.c fll/level_0/path/common.c
@@ -62,7 +62,6 @@ build_sources_program fll/level_0/utf/common.c fll/level_0/utf/convert.c fll/lev
 build_sources_program fll/level_0/utf/private-dynamic.c fll/level_0/utf/private-dynamics.c fll/level_0/utf/private-dynamicss.c fll/level_0/utf/private-maps.c fll/level_0/utf/private-mapss.c fll/level_0/utf/private-map_multis.c fll/level_0/utf/private-map_multiss.c fll/level_0/utf/private-string.c fll/level_0/utf/private-triples.c fll/level_0/utf/private-tripless.c
 
 build_sources_program-thread fll/level_0/thread.c fll/level_0/thread/attribute.c fll/level_0/thread/barrier.c fll/level_0/thread/barrier_attribute.c fll/level_0/thread/condition.c fll/level_0/thread/condition_attribute.c fll/level_0/thread/id.c fll/level_0/thread/key.c fll/level_0/thread/lock.c fll/level_0/thread/lock_attribute.c fll/level_0/thread/mutex.c fll/level_0/thread/mutex_attribute.c fll/level_0/thread/once.c fll/level_0/thread/semaphore.c fll/level_0/thread/set.c fll/level_0/thread/spin.c
-build_sources_program-thread fll/level_0/thread/private-barrier.c fll/level_0/thread/private-barrier_attribute.c fll/level_0/thread/private-condition.c fll/level_0/thread/private-condition_attribute.c
 
 build_sources_program fll/level_1/control_group.c
 build_sources_program fll/level_1/conversion.c fll/level_1/private-conversion.c fll/level_1/conversion/common.c
index 44bfdbeece258b5b45b988b2f8a7c1571b19c80c..9578bec7bffd011b3ba586f54eac9a3e9aa5d7b7 100644 (file)
@@ -25,7 +25,7 @@ void test__f_console_parameters_delete__frees_memory(void **state) {
   }
 
   {
-    const f_status_t status = f_number_unsigneds_resize(3, &parameters.array[0].locations);
+    const f_status_t status = f_memory_array_resize(size, sizeof(f_number_unsigned_t), (void **) &parameters.array[0].locations.array, &parameters.array[0].locations.used, &parameters.array[0].locations.size);
 
     assert_int_equal(status, F_none);
     assert_int_not_equal(parameters.array[0].locations.size, 0);
@@ -33,7 +33,7 @@ void test__f_console_parameters_delete__frees_memory(void **state) {
   }
 
   {
-    const f_status_t status = f_number_unsigneds_resize(size, &parameters.array[0].locations_sub);
+    const f_status_t status = f_memory_array_resize(size, sizeof(f_number_unsigned_t), (void **) &parameters.array[0].locations_sub.array, &parameters.array[0].locations_sub.used, &parameters.array[0].locations_sub.size);
 
     assert_int_equal(status, F_none);
     assert_int_not_equal(parameters.array[0].locations_sub.size, 0);
index c79c3d98a94cf8b9150385140d4622d6a69b9cfe..7877702b24ee6600e84f84985c831e9e59c4c731 100644 (file)
@@ -25,7 +25,7 @@ void test__f_console_parameters_destroy__frees_memory(void **state) {
   }
 
   {
-    const f_status_t status = f_number_unsigneds_resize(size, &parameters.array[0].locations);
+    const f_status_t status = f_memory_array_resize(size, sizeof(f_number_unsigned_t), (void **) &parameters.array[0].locations.array, &parameters.array[0].locations.used, &parameters.array[0].locations.size);
 
     assert_int_equal(status, F_none);
     assert_int_not_equal(parameters.array[0].locations.size, 0);
@@ -33,7 +33,7 @@ void test__f_console_parameters_destroy__frees_memory(void **state) {
   }
 
   {
-    const f_status_t status = f_number_unsigneds_resize(size, &parameters.array[0].locations_sub);
+    const f_status_t status = f_memory_array_resize(size, sizeof(f_number_unsigned_t), (void **) &parameters.array[0].locations_sub.array, &parameters.array[0].locations_sub.used, &parameters.array[0].locations_sub.size);
 
     assert_int_equal(status, F_none);
     assert_int_not_equal(parameters.array[0].locations_sub.size, 0);
index e96c7a7945b930169de8b604572c8e2917ec0042..25b7ce4d4ea7c53060b5da5992208108a33e1713 100644 (file)
@@ -282,7 +282,7 @@ extern "C" {
 
     funlockfile(file.stream);
 
-    return F_none_eof;
+    return F_none;
   }
 #endif // _di_f_file_stream_read_block_
 
index f518cf4348d24f38ecbbb1027a62ebf99f061154..ab42696866c938e567a6808e42879fefcbe00c8a 100644 (file)
@@ -19,7 +19,7 @@ void test__f_iki_datas_append__works(void **state) {
     assert_int_equal(status, F_none);
     assert_int_equal(source.content.size, length);
 
-    status = f_number_unsigneds_resize(length, &source.delimits);
+    status = f_memory_array_resize(length, sizeof(f_number_unsigned_t), (void **) &source.delimits.array, &source.delimits.used, &source.delimits.size);
 
     assert_int_equal(status, F_none);
     assert_int_equal(source.delimits.size, length);
index 15336bb96e6e4afd48d426dcaf30a3971e6033d0..764be627277307e2ecfca08890d04678d834e27e 100644 (file)
@@ -27,7 +27,7 @@ void test__f_iki_datas_append_all__works(void **state) {
       assert_int_equal(status, F_none);
       assert_int_equal(source.array[j].content.size, length);
 
-      status = f_number_unsigneds_resize(length, &source.array[j].delimits);
+      status = f_memory_array_resize(length, sizeof(f_number_unsigned_t), (void **) &source.array[j].delimits.array, &source.array[j].delimits.used, &source.array[j].delimits.size);
 
       assert_int_equal(status, F_none);
       assert_int_equal(source.array[j].delimits.size, length);
index bd239702bf1db19f4b04b215a04f6741ff56425e..83def3e868d0bf0af3a48c47c55f54194a2ee256 100644 (file)
@@ -27,7 +27,7 @@ void test__f_iki_datass_append__works(void **state) {
       assert_int_equal(status, F_none);
       assert_int_equal(source.array[j].content.size, length);
 
-      status = f_number_unsigneds_resize(length, &source.array[j].delimits);
+      status = f_memory_array_resize(length, sizeof(f_number_unsigned_t), (void **) &source.array[j].delimits.array, &source.array[j].delimits.used, &source.array[j].delimits.size);
 
       assert_int_equal(status, F_none);
       assert_int_equal(source.array[j].delimits.size, length);
index 4b4f405a18d9f72a8100bfe987942c56684a6e76..45f68aa3193780974a4b1a3cf0fcf428449a48d8 100644 (file)
@@ -36,7 +36,7 @@ void test__f_iki_datass_append_all__works(void **state) {
         assert_int_equal(status, F_none);
         assert_int_equal(source.array[source.used].array[j].content.size, length);
 
-        status = f_number_unsigneds_resize(length, &source.array[source.used].array[j].delimits);
+        status = f_memory_array_resize(length, sizeof(f_number_unsigned_t), (void **) &source.array[source.used].array[j].delimits.array, &source.array[source.used].array[j].delimits.used, &source.array[source.used].array[j].delimits.size);
 
         assert_int_equal(status, F_none);
         assert_int_equal(source.array[source.used].array[j].delimits.size, length);
index e64ebc316a54a2736e3716245d822ed4d863568d..765734ec7456562165472ed99176eeb05b02cec6 100644 (file)
@@ -1,8 +1,4 @@
 #include "thread.h"
-#include "thread/private-barrier.h"
-#include "thread/private-barrier_attribute.h"
-#include "thread/private-condition.h"
-#include "thread/private-condition_attribute.h"
 
 #ifdef __cplusplus
 extern "C" {
@@ -493,7 +489,7 @@ extern "C" {
       if (!attribute) return F_status_set_error(F_parameter);
     #endif // _di_level_0_parameter_checking_
 
-    return private_f_thread_barrier_attribute_delete(attribute);
+    return pthread_barrierattr_destroy(attribute) ? F_status_set_error(F_failure) : F_none;
   }
 #endif // _di_f_thread_barrier_attribute_delete_
 
@@ -561,7 +557,16 @@ extern "C" {
       if (!barrier) return F_status_set_error(F_parameter);
     #endif // _di_level_0_parameter_checking_
 
-    return private_f_thread_barrier_delete(barrier);
+    const int error = pthread_barrier_destroy(barrier);
+
+    if (error) {
+      if (error == EBUSY) return F_status_set_error(F_busy);
+      if (error == EINVAL) return F_status_set_error(F_parameter);
+
+      return F_status_set_error(F_failure);
+    }
+
+    return F_none;
   }
 #endif // _di_f_thread_barrier_delete_
 
@@ -745,7 +750,18 @@ extern "C" {
       if (!condition_attribute) return F_status_set_error(F_parameter);
     #endif // _di_level_0_parameter_checking_
 
-    return private_f_thread_condition_attribute_delete(condition_attribute);
+    {
+      const int error = pthread_condattr_destroy(condition_attribute);
+
+      if (error) {
+        if (error == EBUSY) return F_status_set_error(F_busy);
+        if (error == EINVAL) return F_status_set_error(F_parameter);
+
+        return F_status_set_error(F_failure);
+      }
+    }
+
+    return F_none;
   }
 #endif // _di_f_thread_condition_attribute_delete_
 
@@ -813,7 +829,16 @@ extern "C" {
       if (!condition) return F_status_set_error(F_parameter);
     #endif // _di_level_0_parameter_checking_
 
-    return private_f_thread_condition_delete(condition);
+    const int error = pthread_cond_destroy(condition);
+
+    if (error) {
+      if (error == EBUSY) return F_status_set_error(F_busy);
+      if (error == EINVAL) return F_status_set_error(F_parameter);
+
+      return F_status_set_error(F_failure);
+    }
+
+    return F_none;
   }
 #endif // _di_f_thread_condition_delete_
 
index 65bb6826f1428b45c325cd6c0eb491ccde65d44a..767995059ef5ff9ac2509bfaa3c3e3cc84b8adee 100644 (file)
@@ -1,5 +1,4 @@
 #include "../thread.h"
-#include "private-barrier.h"
 #include "barrier.h"
 
 #ifdef __cplusplus
@@ -12,7 +11,23 @@ extern "C" {
       if (!structure) return F_status_set_error(F_parameter);
     #endif // _di_level_0_parameter_checking_
 
-    return private_f_thread_barriers_adjust(length, structure);
+    {
+      int error = 0;
+
+      for (f_number_unsigned_t i = length; i < structure->size; ++i) {
+
+       error = pthread_barrier_destroy(&structure->array[i]);
+
+        if (error) {
+          if (error == EBUSY) return F_status_set_error(F_busy);
+          if (error == EINVAL) return F_status_set_error(F_parameter);
+
+          return F_status_set_error(F_failure);
+        }
+      } // for
+    }
+
+    return f_memory_array_adjust(length, sizeof(f_thread_barrier_t), (void **) &structure->array, &structure->used, &structure->size);
   }
 #endif // _di_f_thread_barriers_adjust_
 
@@ -24,7 +39,25 @@ extern "C" {
 
     if (!amount) return F_data_not;
 
-    return private_f_thread_barriers_adjust((structure->size > amount) ? structure->size - amount : 0, structure);
+    const f_number_unsigned_t length = (structure->size > amount) ? structure->size - amount : 0;
+
+    {
+      int error = 0;
+
+      for (f_number_unsigned_t i = length; i < structure->size; ++i) {
+
+       error = pthread_barrier_destroy(&structure->array[i]);
+
+        if (error) {
+          if (error == EBUSY) return F_status_set_error(F_busy);
+          if (error == EINVAL) return F_status_set_error(F_parameter);
+
+          return F_status_set_error(F_failure);
+        }
+      } // for
+    }
+
+    return f_memory_array_adjust(length, sizeof(f_thread_barrier_t), (void **) &structure->array, &structure->used, &structure->size);
   }
 #endif // _di_f_thread_barriers_decimate_by_
 
@@ -36,7 +69,25 @@ extern "C" {
 
     if (!amount) return F_data_not;
 
-    return private_f_thread_barriers_resize((structure->size > amount) ? structure->size - amount : 0, structure);
+    const f_number_unsigned_t length = (structure->size > amount) ? structure->size - amount : 0;
+
+    {
+      int error = 0;
+
+      for (f_number_unsigned_t i = length; i < structure->size; ++i) {
+
+       error = pthread_barrier_destroy(&structure->array[i]);
+
+        if (error) {
+          if (error == EBUSY) return F_status_set_error(F_busy);
+          if (error == EINVAL) return F_status_set_error(F_parameter);
+
+          return F_status_set_error(F_failure);
+        }
+      } // for
+    }
+
+    return f_memory_array_resize(length, sizeof(f_thread_barrier_t), (void **) &structure->array, &structure->used, &structure->size);
   }
 #endif // _di_f_thread_barriers_decrease_by_
 
@@ -55,7 +106,23 @@ extern "C" {
         length = F_number_t_size_unsigned_d;
       }
 
-      return private_f_thread_barriers_resize(length, structure);
+      {
+        int error = 0;
+
+        for (f_number_unsigned_t i = length; i < structure->size; ++i) {
+
+           error = pthread_barrier_destroy(&structure->array[i]);
+
+            if (error) {
+              if (error == EBUSY) return F_status_set_error(F_busy);
+              if (error == EINVAL) return F_status_set_error(F_parameter);
+
+              return F_status_set_error(F_failure);
+            }
+        } // for
+      }
+
+      return f_memory_array_resize(length, sizeof(f_thread_barrier_t), (void **) &structure->array, &structure->used, &structure->size);
     }
 
     return F_data_not;
@@ -76,7 +143,23 @@ extern "C" {
       if (length > structure->size) {
         if (length > F_number_t_size_unsigned_d) return F_status_set_error(F_array_too_large);
 
-        return private_f_thread_barriers_resize(length, structure);
+        {
+          int error = 0;
+
+          for (f_number_unsigned_t i = length; i < structure->size; ++i) {
+
+             error = pthread_barrier_destroy(&structure->array[i]);
+
+              if (error) {
+                if (error == EBUSY) return F_status_set_error(F_busy);
+                if (error == EINVAL) return F_status_set_error(F_parameter);
+
+                return F_status_set_error(F_failure);
+              }
+          } // for
+        }
+
+        return f_memory_array_resize(length, sizeof(f_thread_barrier_t), (void **) &structure->array, &structure->used, &structure->size);
       }
     }
 
@@ -90,7 +173,23 @@ extern "C" {
       if (!structure) return F_status_set_error(F_parameter);
     #endif // _di_level_0_parameter_checking_
 
-    return private_f_thread_barriers_resize(length, structure);
+    {
+      int error = 0;
+
+      for (f_number_unsigned_t i = length; i < structure->size; ++i) {
+
+         error = pthread_barrier_destroy(&structure->array[i]);
+
+          if (error) {
+            if (error == EBUSY) return F_status_set_error(F_busy);
+            if (error == EINVAL) return F_status_set_error(F_parameter);
+
+            return F_status_set_error(F_failure);
+          }
+      } // for
+    }
+
+    return f_memory_array_resize(length, sizeof(f_thread_barrier_t), (void **) &structure->array, &structure->used, &structure->size);
   }
 #endif // _di_f_thread_barriers_resize_
 
index 98f40b57f19537dababe16201bae47c093a5232d..bed0c3248ca1b52e5cebf614e364baed1710cb91 100644 (file)
@@ -1,5 +1,4 @@
 #include "../thread.h"
-#include "private-barrier_attribute.h"
 #include "barrier_attribute.h"
 
 #ifdef __cplusplus
@@ -12,7 +11,11 @@ extern "C" {
       if (!structure) return F_status_set_error(F_parameter);
     #endif // _di_level_0_parameter_checking_
 
-    return private_f_thread_barrier_attributes_adjust(length, structure);
+    for (f_number_unsigned_t i = length; i < structure->size; ++i) {
+      if (pthread_barrierattr_destroy(&structure->array[i])) return F_status_set_error(F_failure);
+    } // for
+
+    return f_memory_array_adjust(length, sizeof(f_thread_barrier_attribute_t), (void **) &structure->array, &structure->used, &structure->size);
   }
 #endif // _di_f_thread_barrier_attributes_adjust_
 
@@ -24,7 +27,13 @@ extern "C" {
 
     if (!amount) return F_data_not;
 
-    return private_f_thread_barrier_attributes_adjust((structure->size > amount) ? structure->size - amount : 0, structure);
+    const f_number_unsigned_t length = (structure->size > amount) ? structure->size - amount : 0;
+
+    for (f_number_unsigned_t i = length; i < structure->size; ++i) {
+      if (pthread_barrierattr_destroy(&structure->array[i])) return F_status_set_error(F_failure);
+    } // for
+
+    return f_memory_array_adjust(length, sizeof(f_thread_barrier_attribute_t), (void **) &structure->array, &structure->used, &structure->size);
   }
 #endif // _di_f_thread_barrier_attributes_decimate_by_
 
@@ -36,7 +45,13 @@ extern "C" {
 
     if (!amount) return F_data_not;
 
-    return private_f_thread_barrier_attributes_resize((structure->size > amount) ? structure->size - amount : 0, structure);
+    const f_number_unsigned_t length = (structure->size > amount) ? structure->size - amount : 0;
+
+    for (f_number_unsigned_t i = length; i < structure->size; ++i) {
+      if (pthread_barrierattr_destroy(&structure->array[i])) return F_status_set_error(F_failure);
+    } // for
+
+    return f_memory_array_resize(length, sizeof(f_thread_barrier_attribute_t), (void **) &structure->array, &structure->used, &structure->size);
   }
 #endif // _di_f_thread_barrier_attributes_decrease_by_
 
@@ -55,7 +70,11 @@ extern "C" {
         length = F_number_t_size_unsigned_d;
       }
 
-      return private_f_thread_barrier_attributes_resize(length, structure);
+      for (f_number_unsigned_t i = length; i < structure->size; ++i) {
+        if (pthread_barrierattr_destroy(&structure->array[i])) return F_status_set_error(F_failure);
+      } // for
+
+      return f_memory_array_resize(length, sizeof(f_thread_barrier_attribute_t), (void **) &structure->array, &structure->used, &structure->size);
     }
 
     return F_data_not;
@@ -76,7 +95,11 @@ extern "C" {
       if (length > structure->size) {
         if (length > F_number_t_size_unsigned_d) return F_status_set_error(F_array_too_large);
 
-        return private_f_thread_barrier_attributes_resize(length, structure);
+        for (f_number_unsigned_t i = length; i < structure->size; ++i) {
+          if (pthread_barrierattr_destroy(&structure->array[i])) return F_status_set_error(F_failure);
+        } // for
+
+        return f_memory_array_resize(length, sizeof(f_thread_barrier_attribute_t), (void **) &structure->array, &structure->used, &structure->size);
       }
     }
 
@@ -90,7 +113,11 @@ extern "C" {
       if (!structure) return F_status_set_error(F_parameter);
     #endif // _di_level_0_parameter_checking_
 
-    return private_f_thread_barrier_attributes_resize(length, structure);
+    for (f_number_unsigned_t i = length; i < structure->size; ++i) {
+      if (pthread_barrierattr_destroy(&structure->array[i])) return F_status_set_error(F_failure);
+    } // for
+
+    return f_memory_array_resize(length, sizeof(f_thread_barrier_attribute_t), (void **) &structure->array, &structure->used, &structure->size);
   }
 #endif // _di_f_thread_barrier_attributes_resize_
 
index 618df127a5db824d0f90cba851eb2d25131c5aa6..7fe5170cf942f525952aff0164aa7db66f7fe7e5 100644 (file)
@@ -1,5 +1,4 @@
 #include "../thread.h"
-#include "private-condition.h"
 #include "condition.h"
 
 #ifdef __cplusplus
@@ -12,7 +11,23 @@ extern "C" {
       if (!structure) return F_status_set_error(F_parameter);
     #endif // _di_level_0_parameter_checking_
 
-    return private_f_thread_conditions_adjust(length, structure);
+    {
+      int error = 0;
+
+      for (f_number_unsigned_t i = length; i < structure->size; ++i) {
+
+        error = pthread_cond_destroy(&structure->array[i]);
+
+        if (error) {
+          if (error == EBUSY) return F_status_set_error(F_busy);
+          if (error == EINVAL) return F_status_set_error(F_parameter);
+
+          return F_status_set_error(F_failure);
+        }
+      } // for
+    }
+
+    return f_memory_array_adjust(length, sizeof(f_thread_condition_t), (void **) &structure->array, &structure->used, &structure->size);
   }
 #endif // _di_f_thread_conditions_adjust_
 
@@ -24,7 +39,25 @@ extern "C" {
 
     if (!amount) return F_data_not;
 
-    return private_f_thread_conditions_adjust((structure->size > amount) ? structure->size - amount : 0, structure);
+    const f_number_unsigned_t length = (structure->size > amount) ? structure->size - amount : 0;
+
+    {
+      int error = 0;
+
+      for (f_number_unsigned_t i = length; i < structure->size; ++i) {
+
+        error = pthread_cond_destroy(&structure->array[i]);
+
+        if (error) {
+          if (error == EBUSY) return F_status_set_error(F_busy);
+          if (error == EINVAL) return F_status_set_error(F_parameter);
+
+          return F_status_set_error(F_failure);
+        }
+      } // for
+    }
+
+    return f_memory_array_adjust(length, sizeof(f_thread_condition_t), (void **) &structure->array, &structure->used, &structure->size);
   }
 #endif // _di_f_thread_conditions_decimate_by_
 
@@ -36,7 +69,25 @@ extern "C" {
 
     if (!amount) return F_data_not;
 
-    return private_f_thread_conditions_resize((structure->size > amount) ? structure->size - amount : 0, structure);
+    const f_number_unsigned_t length = (structure->size > amount) ? structure->size - amount : 0;
+
+    {
+      int error = 0;
+
+      for (f_number_unsigned_t i = length; i < structure->size; ++i) {
+
+        error = pthread_cond_destroy(&structure->array[i]);
+
+        if (error) {
+          if (error == EBUSY) return F_status_set_error(F_busy);
+          if (error == EINVAL) return F_status_set_error(F_parameter);
+
+          return F_status_set_error(F_failure);
+        }
+      } // for
+    }
+
+    return f_memory_array_resize(length, sizeof(f_thread_condition_t), (void **) &structure->array, &structure->used, &structure->size);
   }
 #endif // _di_f_thread_conditions_decrease_by_
 
@@ -55,7 +106,23 @@ extern "C" {
         length = F_number_t_size_unsigned_d;
       }
 
-      return private_f_thread_conditions_resize(length, structure);
+      {
+        int error = 0;
+
+        for (f_number_unsigned_t i = length; i < structure->size; ++i) {
+
+          error = pthread_cond_destroy(&structure->array[i]);
+
+          if (error) {
+            if (error == EBUSY) return F_status_set_error(F_busy);
+            if (error == EINVAL) return F_status_set_error(F_parameter);
+
+            return F_status_set_error(F_failure);
+          }
+        } // for
+      }
+
+        return f_memory_array_resize(length, sizeof(f_thread_condition_t), (void **) &structure->array, &structure->used, &structure->size);
     }
 
     return F_data_not;
@@ -76,7 +143,23 @@ extern "C" {
       if (length > structure->size) {
         if (length > F_number_t_size_unsigned_d) return F_status_set_error(F_array_too_large);
 
-        return private_f_thread_conditions_resize(length, structure);
+        {
+          int error = 0;
+
+          for (f_number_unsigned_t i = length; i < structure->size; ++i) {
+
+            error = pthread_cond_destroy(&structure->array[i]);
+
+            if (error) {
+              if (error == EBUSY) return F_status_set_error(F_busy);
+              if (error == EINVAL) return F_status_set_error(F_parameter);
+
+              return F_status_set_error(F_failure);
+            }
+          } // for
+        }
+
+        return f_memory_array_resize(length, sizeof(f_thread_condition_t), (void **) &structure->array, &structure->used, &structure->size);
       }
     }
 
@@ -90,7 +173,23 @@ extern "C" {
       if (!structure) return F_status_set_error(F_parameter);
     #endif // _di_level_0_parameter_checking_
 
-    return private_f_thread_conditions_resize(length, structure);
+    {
+      int error = 0;
+
+      for (f_number_unsigned_t i = length; i < structure->size; ++i) {
+
+        error = pthread_cond_destroy(&structure->array[i]);
+
+        if (error) {
+          if (error == EBUSY) return F_status_set_error(F_busy);
+          if (error == EINVAL) return F_status_set_error(F_parameter);
+
+          return F_status_set_error(F_failure);
+        }
+      } // for
+    }
+
+    return f_memory_array_resize(length, sizeof(f_thread_condition_t), (void **) &structure->array, &structure->used, &structure->size);
   }
 #endif // _di_f_thread_conditions_resize_
 
index 5d2200a59fefefdacedda0b56d4973e1b7a9b526..ebca2de63b6c831328984e3bd5fa0cb4e0f4ff8a 100644 (file)
@@ -1,5 +1,4 @@
 #include "../thread.h"
-#include "private-condition_attribute.h"
 #include "condition_attribute.h"
 
 #ifdef __cplusplus
@@ -12,7 +11,23 @@ extern "C" {
       if (!structure) return F_status_set_error(F_parameter);
     #endif // _di_level_0_parameter_checking_
 
-    return private_f_thread_condition_attributes_adjust(length, structure);
+    {
+      int error = 0;
+
+      for (f_number_unsigned_t i = length; i < structure->size; ++i) {
+
+        error = pthread_condattr_destroy(&structure->array[i]);
+
+        if (error) {
+          if (error == EBUSY) return F_status_set_error(F_busy);
+          if (error == EINVAL) return F_status_set_error(F_parameter);
+
+          return F_status_set_error(F_failure);
+        }
+      } // for
+    }
+
+    return f_memory_array_adjust(length, sizeof(f_thread_condition_attribute_t), (void **) &structure->array, &structure->used, &structure->size);
   }
 #endif // _di_f_thread_condition_attributes_adjust_
 
@@ -24,7 +39,25 @@ extern "C" {
 
     if (!amount) return F_data_not;
 
-    return private_f_thread_condition_attributes_adjust((structure->size > amount) ? structure->size - amount : 0, structure);
+    const f_number_unsigned_t length = (structure->size > amount) ? structure->size - amount : 0;
+
+    {
+      int error = 0;
+
+      for (f_number_unsigned_t i = length; i < structure->size; ++i) {
+
+        error = pthread_condattr_destroy(&structure->array[i]);
+
+        if (error) {
+          if (error == EBUSY) return F_status_set_error(F_busy);
+          if (error == EINVAL) return F_status_set_error(F_parameter);
+
+          return F_status_set_error(F_failure);
+        }
+      } // for
+    }
+
+    return f_memory_array_adjust(length, sizeof(f_thread_condition_attribute_t), (void **) &structure->array, &structure->used, &structure->size);
   }
 #endif // _di_f_thread_condition_attributes_decimate_by_
 
@@ -36,7 +69,25 @@ extern "C" {
 
     if (!amount) return F_data_not;
 
-    return private_f_thread_condition_attributes_resize((structure->size > amount) ? structure->size - amount : 0, structure);
+    const f_number_unsigned_t length = (structure->size > amount) ? structure->size - amount : 0;
+
+    {
+      int error = 0;
+
+      for (f_number_unsigned_t i = length; i < structure->size; ++i) {
+
+        error = pthread_condattr_destroy(&structure->array[i]);
+
+        if (error) {
+          if (error == EBUSY) return F_status_set_error(F_busy);
+          if (error == EINVAL) return F_status_set_error(F_parameter);
+
+          return F_status_set_error(F_failure);
+        }
+      } // for
+    }
+
+    return f_memory_array_resize(length, sizeof(f_thread_condition_attribute_t), (void **) &structure->array, &structure->used, &structure->size);
   }
 #endif // _di_f_thread_condition_attributes_decrease_by_
 
@@ -55,7 +106,23 @@ extern "C" {
         length = F_number_t_size_unsigned_d;
       }
 
-      return private_f_thread_condition_attributes_resize(length, structure);
+      {
+        int error = 0;
+
+        for (f_number_unsigned_t i = length; i < structure->size; ++i) {
+
+          error = pthread_condattr_destroy(&structure->array[i]);
+
+          if (error) {
+            if (error == EBUSY) return F_status_set_error(F_busy);
+            if (error == EINVAL) return F_status_set_error(F_parameter);
+
+            return F_status_set_error(F_failure);
+          }
+        } // for
+      }
+
+      return f_memory_array_resize(length, sizeof(f_thread_condition_attribute_t), (void **) &structure->array, &structure->used, &structure->size);
     }
 
     return F_data_not;
@@ -76,7 +143,23 @@ extern "C" {
       if (length > structure->size) {
         if (length > F_number_t_size_unsigned_d) return F_status_set_error(F_array_too_large);
 
-        return private_f_thread_condition_attributes_resize(length, structure);
+        {
+          int error = 0;
+
+          for (f_number_unsigned_t i = length; i < structure->size; ++i) {
+
+            error = pthread_condattr_destroy(&structure->array[i]);
+
+            if (error) {
+              if (error == EBUSY) return F_status_set_error(F_busy);
+              if (error == EINVAL) return F_status_set_error(F_parameter);
+
+              return F_status_set_error(F_failure);
+            }
+          } // for
+        }
+
+        return f_memory_array_resize(length, sizeof(f_thread_condition_attribute_t), (void **) &structure->array, &structure->used, &structure->size);
       }
     }
 
@@ -90,7 +173,23 @@ extern "C" {
       if (!structure) return F_status_set_error(F_parameter);
     #endif // _di_level_0_parameter_checking_
 
-    return private_f_thread_condition_attributes_resize(length, structure);
+    {
+      int error = 0;
+
+      for (f_number_unsigned_t i = length; i < structure->size; ++i) {
+
+        error = pthread_condattr_destroy(&structure->array[i]);
+
+        if (error) {
+          if (error == EBUSY) return F_status_set_error(F_busy);
+          if (error == EINVAL) return F_status_set_error(F_parameter);
+
+          return F_status_set_error(F_failure);
+        }
+      } // for
+    }
+
+    return f_memory_array_resize(length, sizeof(f_thread_condition_attribute_t), (void **) &structure->array, &structure->used, &structure->size);
   }
 #endif // _di_f_thread_condition_attributes_resize_
 
diff --git a/level_0/f_thread/c/thread/private-barrier.c b/level_0/f_thread/c/thread/private-barrier.c
deleted file mode 100644 (file)
index b9535e5..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-#include "../thread.h"
-#include "private-barrier.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#if !defined(_di_f_thread_barriers_adjust_) || !defined(_di_f_thread_barriers_decimate_by_) || !defined(_di_f_thread_barriers_decrease_) || !defined(_di_f_thread_barriers_decrease_by_) || !defined(_di_f_thread_barriers_increase_) || !defined(_di_f_thread_barriers_increase_by_) || !defined(_di_f_thread_barriers_resize_)
-  f_status_t private_f_thread_barrier_delete(f_thread_barrier_t *structure) {
-
-    const int error = pthread_barrier_destroy(structure);
-
-    if (error) {
-      if (error == EBUSY) return F_status_set_error(F_busy);
-      if (error == EINVAL) return F_status_set_error(F_parameter);
-
-      return F_status_set_error(F_failure);
-    }
-
-    return F_none;
-  }
-#endif // !defined(_di_f_thread_barriers_adjust_) || !defined(_di_f_thread_barriers_decimate_by_) || !defined(_di_f_thread_barriers_decrease_) || !defined(_di_f_thread_barriers_decrease_by_) || !defined(_di_f_thread_barriers_increase_) || !defined(_di_f_thread_barriers_increase_by_) || !defined(_di_f_thread_barriers_resize_)
-
-#if !defined(_di_f_thread_barriers_adjust_) || !defined(_di_f_thread_barriers_decimate_by_)
-  f_status_t private_f_thread_barriers_adjust(const f_number_unsigned_t length, f_thread_barriers_t * const structure) {
-
-    f_status_t status = F_none;
-
-    for (f_number_unsigned_t i = length; i < structure->size; ++i) {
-
-      status = private_f_thread_barrier_delete(&structure->array[i]);
-      if (F_status_is_error(status)) return status;
-    } // for
-
-    return f_memory_array_adjust(length, sizeof(f_thread_barrier_t), (void **) &structure->array, &structure->used, &structure->size);
-  }
-#endif // !defined(_di_f_thread_barriers_adjust_) || !defined(_di_f_thread_barriers_decimate_by_)
-
-#if !defined(_di_f_thread_barriers_decrease_) || !defined(_di_f_thread_barriers_decrease_by_) || !defined(_di_f_thread_barriers_increase_) || !defined(_di_f_thread_barriers_increase_by_)
-  f_status_t private_f_thread_barriers_resize(const f_number_unsigned_t length, f_thread_barriers_t * const structure) {
-
-    f_status_t status = F_none;
-
-    for (f_number_unsigned_t i = length; i < structure->size; ++i) {
-
-      status = private_f_thread_barrier_delete(&structure->array[i]);
-      if (F_status_is_error(status)) return status;
-    } // for
-
-    return f_memory_array_resize(length, sizeof(f_thread_barrier_t), (void **) &structure->array, &structure->used, &structure->size);
-  }
-#endif // !defined(_di_f_thread_barriers_decrease_) || !defined(_di_f_thread_barriers_decrease_by_) || !defined(_di_f_thread_barriers_increase_) || !defined(_di_f_thread_barriers_increase_by_)
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
diff --git a/level_0/f_thread/c/thread/private-barrier.h b/level_0/f_thread/c/thread/private-barrier.h
deleted file mode 100644 (file)
index a0551a0..0000000
+++ /dev/null
@@ -1,102 +0,0 @@
-/**
- * FLL - Level 0
- *
- * Project: Thread
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * These are provided for internal reduction in redundant code.
- * These should not be exposed/used outside of this project.
- */
-#ifndef _PRIVATE_F_thread_barrier_h
-#define _PRIVATE_F_thread_barrier_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * Private implementation for deleting (and destroying).
- *
- * Intended to be shared to each of the different implementation variations.
- *
- * @param length
- *   The new size to use.
- * @param structure
- *   The barrier to delete.
- *
- * @return
- *   F_none on success.
- *
- *   F_busy (with error bit) if the lock is busy.
- *   F_failure (with error bit) on error.
- *   F_parameter (with error bit) if a parameter is invalid.
- *
- * @see pthread_attr_destroy()
- *
- * @see f_thread_barriers_adjust()
- * @see f_thread_barriers_decimate_by()
- * @see f_thread_barriers_decrease()
- * @see f_thread_barriers_decrease_by()
- * @see f_thread_barriers_increase()
- * @see f_thread_barriers_increase_by()
- * @see f_thread_barriers_resize()
- */
-#if !defined(_di_f_thread_barriers_adjust_) || !defined(_di_f_thread_barriers_decimate_by_) || !defined(_di_f_thread_barriers_decrease_) || !defined(_di_f_thread_barriers_decrease_by_) || !defined(_di_f_thread_barriers_increase_) || !defined(_di_f_thread_barriers_increase_by_) || !defined(_di_f_thread_barriers_resize_)
-  extern f_status_t private_f_thread_barrier_delete(f_thread_barrier_t *structure) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_thread_barriers_adjust_) || !defined(_di_f_thread_barriers_decimate_by_) || !defined(_di_f_thread_barriers_decrease_) || !defined(_di_f_thread_barriers_decrease_by_) || !defined(_di_f_thread_barriers_increase_) || !defined(_di_f_thread_barriers_increase_by_) || !defined(_di_f_thread_barriers_resize_)
-
-/**
- * Private implementation for resizing.
- *
- * Intended to be shared to each of the different implementation variations.
- *
- * @param length
- *   The new size to use.
- * @param structure
- *   The barriers to adjust.
- *
- * @return
- *   F_none on success.
- *
- *   Errors (with error bit) from: f_memory_array_resize().
- *
- * @see f_memory_array_resize()
- *
- * @see f_thread_barriers_adjust()
- * @see f_thread_barriers_decimate_by()
- */
-#if !defined(_di_f_thread_barriers_adjust_) || !defined(_di_f_thread_barriers_decimate_by_)
-  extern f_status_t private_f_thread_barriers_adjust(const f_number_unsigned_t length, f_thread_barriers_t * const structure) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_thread_barriers_adjust_) || !defined(_di_f_thread_barriers_decimate_by_)
-
-/**
- * Private implementation for resizing.
- *
- * Intended to be shared to each of the different implementation variations.
- *
- * @param length
- *   The new size to use.
- * @param structure
- *   The barriers to resize.
- *
- * @return
- *   F_none on success.
- *
- *   Errors (with error bit) from: f_memory_array_resize().
- *
- * @see f_memory_array_resize()
- *
- * @see f_thread_barriers_decrease_by()
- * @see f_thread_barriers_increase()
- * @see f_thread_barriers_increase_by()
- */
-#if !defined(_di_f_thread_barriers_decrease_by_) || !defined(_di_f_thread_barriers_increase_) || !defined(_di_f_thread_barriers_increase_by_)
-  extern f_status_t private_f_thread_barriers_resize(const f_number_unsigned_t length, f_thread_barriers_t * const structure) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_thread_barriers_decrease_by_) || !defined(_di_f_thread_barriers_increase_) || !defined(_di_f_thread_barriers_increase_by_)
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
-
-#endif // _PRIVATE_F_thread_barrier_h
diff --git a/level_0/f_thread/c/thread/private-barrier_attribute.c b/level_0/f_thread/c/thread/private-barrier_attribute.c
deleted file mode 100644 (file)
index b5182f1..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-#include "../thread.h"
-#include "private-barrier_attribute.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#if !defined(_di_f_thread_barrier_attributes_adjust_) || !defined(_di_f_thread_barrier_attributes_decimate_by_) || !defined(_di_f_thread_barrier_attributes_decrease_) || !defined(_di_f_thread_barrier_attributes_decrease_by_) || !defined(_di_f_thread_barrier_attributes_increase_) || !defined(_di_f_thread_barrier_attributes_increase_by_) || !defined(_di_f_thread_barrier_attributes_resize_)
-  f_status_t private_f_thread_barrier_attribute_delete(f_thread_barrier_attribute_t *structure) {
-
-    if (pthread_barrierattr_destroy(structure)) return F_status_set_error(F_failure);
-
-    return F_none;
-  }
-#endif // !defined(_di_f_thread_barrier_attributes_adjust_) || !defined(_di_f_thread_barrier_attributes_decimate_by_) || !defined(_di_f_thread_barrier_attributes_decrease_) || !defined(_di_f_thread_barrier_attributes_decrease_by_) || !defined(_di_f_thread_barrier_attributes_increase_) || !defined(_di_f_thread_barrier_attributes_increase_by_) || !defined(_di_f_thread_barrier_attributes_resize_)
-
-#if !defined(_di_f_thread_barrier_attributes_adjust_) || !defined(_di_f_thread_barrier_attributes_decimate_by_)
-  f_status_t private_f_thread_barrier_attributes_adjust(const f_number_unsigned_t length, f_thread_barrier_attributes_t * const attributes) {
-
-    f_status_t status = F_none;
-
-    for (f_number_unsigned_t i = length; i < attributes->size; ++i) {
-
-      status = private_f_thread_barrier_attribute_delete(&attributes->array[i]);
-      if (F_status_is_error(status)) return status;
-    } // for
-
-    return f_memory_array_adjust(length, sizeof(f_thread_barrier_attribute_t), (void **) &attributes->array, &attributes->used, &attributes->size);
-  }
-#endif // !defined(_di_f_thread_barrier_attributes_adjust_) || !defined(_di_f_thread_barrier_attributes_decimate_by_)
-
-#if !defined(_di_f_thread_barrier_attributes_decrease_) || !defined(_di_f_thread_barrier_attributes_decrease_by_) || !defined(_di_f_thread_barrier_attributes_increase_) || !defined(_di_f_thread_barrier_attributes_increase_by_)
-  f_status_t private_f_thread_barrier_attributes_resize(const f_number_unsigned_t length, f_thread_barrier_attributes_t * const attributes) {
-
-    f_status_t status = F_none;
-
-    for (f_number_unsigned_t i = length; i < attributes->size; ++i) {
-
-      status = private_f_thread_barrier_attribute_delete(&attributes->array[i]);
-      if (F_status_is_error(status)) return status;
-    } // for
-
-    return f_memory_array_resize(length, sizeof(f_thread_barrier_attribute_t), (void **) &attributes->array, &attributes->used, &attributes->size);
-  }
-#endif // !defined(_di_f_thread_barrier_attributes_decrease_) || !defined(_di_f_thread_barrier_attributes_decrease_by_) || !defined(_di_f_thread_barrier_attributes_increase_) || !defined(_di_f_thread_barrier_attributes_increase_by_)
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
diff --git a/level_0/f_thread/c/thread/private-barrier_attribute.h b/level_0/f_thread/c/thread/private-barrier_attribute.h
deleted file mode 100644 (file)
index e56a8cd..0000000
+++ /dev/null
@@ -1,102 +0,0 @@
-/**
- * FLL - Level 0
- *
- * Project: Thread
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * These are provided for internal reduction in redundant code.
- * These should not be exposed/used outside of this project.
- */
-#ifndef _PRIVATE_F_thread_barrier_attribute_h
-#define _PRIVATE_F_thread_barrier_attribute_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * Private implementation for deleting (and destroying).
- *
- * Intended to be shared to each of the different implementation variations.
- *
- * @param length
- *   The new size to use.
- * @param structure
- *   The attribute to delete.
- *
- * @return
- *   F_none on success.
- *
- *   F_busy (with error bit) if the lock is busy.
- *   F_failure (with error bit) on error.
- *   F_parameter (with error bit) if a parameter is invalid.
- *
- * @see pthread_attr_destroy()
- *
- * @see f_thread_barrier_attributes_adjust()
- * @see f_thread_barrier_attributes_decimate_by()
- * @see f_thread_barrier_attributes_decrease()
- * @see f_thread_barrier_attributes_decrease_by()
- * @see f_thread_barrier_attributes_increase()
- * @see f_thread_barrier_attributes_increase_by()
- * @see f_thread_barrier_attributes_resize()
- */
-#if !defined(_di_f_thread_barrier_attributes_adjust_) || !defined(_di_f_thread_barrier_attributes_decimate_by_) || !defined(_di_f_thread_barrier_attributes_decrease_) || !defined(_di_f_thread_barrier_attributes_decrease_by_) || !defined(_di_f_thread_barrier_attributes_increase_) || !defined(_di_f_thread_barrier_attributes_increase_by_) || !defined(_di_f_thread_barrier_attributes_resize_)
-  extern f_status_t private_f_thread_barrier_attribute_delete(f_thread_barrier_attribute_t *structure) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_thread_barrier_attributes_adjust_) || !defined(_di_f_thread_barrier_attributes_decimate_by_) || !defined(_di_f_thread_barrier_attributes_decrease_) || !defined(_di_f_thread_barrier_attributes_decrease_by_) || !defined(_di_f_thread_barrier_attributes_increase_) || !defined(_di_f_thread_barrier_attributes_increase_by_) || !defined(_di_f_thread_barrier_attributes_resize_)
-
-/**
- * Private implementation for resizing.
- *
- * Intended to be shared to each of the different implementation variations.
- *
- * @param length
- *   The new size to use.
- * @param structure
- *   The barrier_attributes to adjust.
- *
- * @return
- *   F_none on success.
- *
- *   Errors (with error bit) from: f_memory_array_resize().
- *
- * @see f_memory_array_resize()
- *
- * @see f_thread_barrier_attributes_adjust()
- * @see f_thread_barrier_attributes_decimate_by()
- */
-#if !defined(_di_f_thread_barrier_attributes_adjust_) || !defined(_di_f_thread_barrier_attributes_decimate_by_)
-  extern f_status_t private_f_thread_barrier_attributes_adjust(const f_number_unsigned_t length, f_thread_barrier_attributes_t * const structure) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_thread_barrier_attributes_adjust_) || !defined(_di_f_thread_barrier_attributes_decimate_by_)
-
-/**
- * Private implementation for resizing.
- *
- * Intended to be shared to each of the different implementation variations.
- *
- * @param length
- *   The new size to use.
- * @param structure
- *   The barrier_attributes to resize.
- *
- * @return
- *   F_none on success.
- *
- *   Errors (with error bit) from: f_memory_array_resize().
- *
- * @see f_memory_array_resize()
- *
- * @see f_thread_barrier_attributes_decrease_by()
- * @see f_thread_barrier_attributes_increase()
- * @see f_thread_barrier_attributes_increase_by()
- */
-#if !defined(_di_f_thread_barrier_attributes_decrease_by_) || !defined(_di_f_thread_barrier_attributes_increase_) || !defined(_di_f_thread_barrier_attributes_increase_by_)
-  extern f_status_t private_f_thread_barrier_attributes_resize(const f_number_unsigned_t length, f_thread_barrier_attributes_t * const structure) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_thread_barrier_attributes_decrease_by_) || !defined(_di_f_thread_barrier_attributes_increase_) || !defined(_di_f_thread_barrier_attributes_increase_by_)
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
-
-#endif // _PRIVATE_F_thread_barrier_attribute_h
diff --git a/level_0/f_thread/c/thread/private-condition.c b/level_0/f_thread/c/thread/private-condition.c
deleted file mode 100644 (file)
index 36a1aa5..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-#include "../thread.h"
-#include "private-condition.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#if !defined(_di_f_thread_condition_delete_) || !defined(_di_f_thread_conditions_adjust_) || !defined(_di_f_thread_conditions_decimate_by_) || !defined(_di_f_thread_conditions_decrease_) || !defined(_di_f_thread_conditions_decrease_by_) || !defined(_di_f_thread_conditions_increase_) || !defined(_di_f_thread_conditions_increase_by_) || !defined(_di_f_thread_conditions_resize_)
-  f_status_t private_f_thread_condition_delete(f_thread_condition_t *condition) {
-
-    const int error = pthread_cond_destroy(condition);
-
-    if (error) {
-      if (error == EBUSY) return F_status_set_error(F_busy);
-      if (error == EINVAL) return F_status_set_error(F_parameter);
-
-      return F_status_set_error(F_failure);
-    }
-
-    return F_none;
-  }
-#endif // !defined(_di_f_thread_condition_delete_) || !defined(_di_f_thread_conditions_adjust_) || !defined(_di_f_thread_conditions_decimate_by_) || !defined(_di_f_thread_conditions_decrease_) || !defined(_di_f_thread_conditions_decrease_by_) || !defined(_di_f_thread_conditions_increase_) || !defined(_di_f_thread_conditions_increase_by_) || !defined(_di_f_thread_conditions_resize_)
-
-#if !defined(_di_f_thread_conditions_adjust_) || !defined(_di_f_thread_conditions_decimate_by_)
-  f_status_t private_f_thread_conditions_adjust(const f_number_unsigned_t length, f_thread_conditions_t * const structure) {
-
-    f_status_t status = F_none;
-
-    for (f_number_unsigned_t i = length; i < structure->size; ++i) {
-
-      status = private_f_thread_condition_delete(&structure->array[i]);
-      if (F_status_is_error(status)) return status;
-    } // for
-
-    return f_memory_array_adjust(length, sizeof(f_thread_condition_t), (void **) &structure->array, &structure->used, &structure->size);
-  }
-#endif // !defined(_di_f_thread_conditions_adjust_) || !defined(_di_f_thread_conditions_decimate_by_)
-
-#if !defined(_di_f_thread_conditions_decrease_) || !defined(_di_f_thread_conditions_decrease_by_) || !defined(_di_f_thread_conditions_increase_) || !defined(_di_f_thread_conditions_increase_by_)
-  f_status_t private_f_thread_conditions_resize(const f_number_unsigned_t length, f_thread_conditions_t * const structure) {
-
-    f_status_t status = F_none;
-
-    for (f_number_unsigned_t i = length; i < structure->size; ++i) {
-
-      status = private_f_thread_condition_delete(&structure->array[i]);
-      if (F_status_is_error(status)) return status;
-    } // for
-
-    return f_memory_array_resize(length, sizeof(f_thread_condition_t), (void **) &structure->array, &structure->used, &structure->size);
-  }
-#endif // !defined(_di_f_thread_conditions_decrease_) || !defined(_di_f_thread_conditions_decrease_by_) || !defined(_di_f_thread_conditions_increase_) || !defined(_di_f_thread_conditions_increase_by_)
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
diff --git a/level_0/f_thread/c/thread/private-condition.h b/level_0/f_thread/c/thread/private-condition.h
deleted file mode 100644 (file)
index e5d9c51..0000000
+++ /dev/null
@@ -1,103 +0,0 @@
-/**
- * FLL - Level 0
- *
- * Project: Thread
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * These are provided for internal reduction in redundant code.
- * These should not be exposed/used outside of this project.
- */
-#ifndef _PRIVATE_F_thread_condition_h
-#define _PRIVATE_F_thread_condition_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * Private implementation for deleting (and destroying).
- *
- * Intended to be shared to each of the different implementation variations.
- *
- * @param length
- *   The new size to use.
- * @param structure
- *   The conditions to adjust.
- *
- * @return
- *   F_none on success.
- *
- *   F_busy (with error bit) if the lock is busy.
- *   F_failure (with error bit) on error.
- *   F_parameter (with error bit) if a parameter is invalid.
- *
- * @see pthread_cond_destroy()
- *
- * @see f_thread_condition_delete()
- * @see f_thread_conditions_adjust()
- * @see f_thread_conditions_decimate_by()
- * @see f_thread_conditions_decrease()
- * @see f_thread_conditions_decrease_by()
- * @see f_thread_conditions_increase()
- * @see f_thread_conditions_increase_by()
- * @see f_thread_conditions_resize()
- */
-#if !defined(_di_f_thread_condition_delete_) || !defined(_di_f_thread_conditions_adjust_) || !defined(_di_f_thread_conditions_decimate_by_) || !defined(_di_f_thread_conditions_decrease_) || !defined(_di_f_thread_conditions_decrease_by_) || !defined(_di_f_thread_conditions_increase_) || !defined(_di_f_thread_conditions_increase_by_) || !defined(_di_f_thread_conditions_resize_)
-  extern f_status_t private_f_thread_condition_delete(f_thread_condition_t *structure) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_thread_condition_delete_) || !defined(_di_f_thread_conditions_adjust_) || !defined(_di_f_thread_conditions_decimate_by_) || !defined(_di_f_thread_conditions_decrease_) || !defined(_di_f_thread_conditions_decrease_by_) || !defined(_di_f_thread_conditions_increase_) || !defined(_di_f_thread_conditions_increase_by_) || !defined(_di_f_thread_conditions_resize_)
-
-/**
- * Private implementation for resizing.
- *
- * Intended to be shared to each of the different implementation variations.
- *
- * @param length
- *   The new size to use.
- * @param structure
- *   The conditions to adjust.
- *
- * @return
- *   F_none on success.
- *
- *   Errors (with error bit) from: f_memory_array_resize().
- *
- * @see f_memory_array_resize()
- *
- * @see f_thread_conditions_adjust()
- * @see f_thread_conditions_decimate_by()
- */
-#if !defined(_di_f_thread_conditions_adjust_) || !defined(_di_f_thread_conditions_decimate_by_)
-  extern f_status_t private_f_thread_conditions_adjust(const f_number_unsigned_t length, f_thread_conditions_t * const structure) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_thread_conditions_adjust_) || !defined(_di_f_thread_conditions_decimate_by_)
-
-/**
- * Private implementation for resizing.
- *
- * Intended to be shared to each of the different implementation variations.
- *
- * @param length
- *   The new size to use.
- * @param structure
- *   The conditions to resize.
- *
- * @return
- *   F_none on success.
- *
- *   Errors (with error bit) from: f_memory_array_resize().
- *
- * @see f_memory_array_resize()
- *
- * @see f_thread_conditions_decrease_by()
- * @see f_thread_conditions_increase()
- * @see f_thread_conditions_increase_by()
- */
-#if !defined(_di_f_thread_conditions_decrease_by_) || !defined(_di_f_thread_conditions_increase_) || !defined(_di_f_thread_conditions_increase_by_)
-  extern f_status_t private_f_thread_conditions_resize(const f_number_unsigned_t length, f_thread_conditions_t * const structure) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_thread_conditions_decrease_by_) || !defined(_di_f_thread_conditions_increase_) || !defined(_di_f_thread_conditions_increase_by_)
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
-
-#endif // _PRIVATE_F_thread_condition_h
diff --git a/level_0/f_thread/c/thread/private-condition_attribute.c b/level_0/f_thread/c/thread/private-condition_attribute.c
deleted file mode 100644 (file)
index bc36c33..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-#include "../thread.h"
-#include "private-condition_attribute.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#if !defined(_di_f_thread_condition_attributes_adjust_) || !defined(_di_f_thread_condition_attributes_decimate_by_) || !defined(_di_f_thread_condition_attributes_decrease_) || !defined(_di_f_thread_condition_attributes_decrease_by_) || !defined(_di_f_thread_condition_attributes_increase_) || !defined(_di_f_thread_condition_attributes_increase_by_) || !defined(_di_f_thread_condition_attributes_resize_)
-  f_status_t private_f_thread_condition_attribute_delete(f_thread_condition_attribute_t * const attribute) {
-
-    const int error = pthread_condattr_destroy(attribute);
-
-    if (error) {
-      if (error == EBUSY) return F_status_set_error(F_busy);
-      if (error == EINVAL) return F_status_set_error(F_parameter);
-
-      return F_status_set_error(F_failure);
-    }
-
-    return F_none;
-  }
-#endif // !defined(_di_f_thread_condition_attributes_adjust_) || !defined(_di_f_thread_condition_attributes_decimate_by_) || !defined(_di_f_thread_condition_attributes_decrease_) || !defined(_di_f_thread_condition_attributes_decrease_by_) || !defined(_di_f_thread_condition_attributes_increase_) || !defined(_di_f_thread_condition_attributes_increase_by_) || !defined(_di_f_thread_condition_attributes_resize_)
-
-#if !defined(_di_f_thread_condition_attributes_adjust_) || !defined(_di_f_thread_condition_attributes_decimate_by_)
-  f_status_t private_f_thread_condition_attributes_adjust(const f_number_unsigned_t length, f_thread_condition_attributes_t * const structure) {
-
-    f_status_t status = F_none;
-
-    for (f_number_unsigned_t i = length; i < structure->size; ++i) {
-
-      status = private_f_thread_condition_attribute_delete(&structure->array[i]);
-      if (F_status_is_error(status)) return status;
-    } // for
-
-    return f_memory_array_adjust(length, sizeof(f_thread_condition_attribute_t), (void **) &structure->array, &structure->used, &structure->size);
-  }
-#endif // !defined(_di_f_thread_condition_attributes_adjust_) || !defined(_di_f_thread_condition_attributes_decimate_by_)
-
-#if !defined(_di_f_thread_condition_attributes_decrease_) || !defined(_di_f_thread_condition_attributes_decrease_by_) || !defined(_di_f_thread_condition_attributes_increase_) || !defined(_di_f_thread_condition_attributes_increase_by_)
-  f_status_t private_f_thread_condition_attributes_resize(const f_number_unsigned_t length, f_thread_condition_attributes_t * const structure) {
-
-    f_status_t status = F_none;
-
-    for (f_number_unsigned_t i = length; i < structure->size; ++i) {
-
-      status = private_f_thread_condition_attribute_delete(&structure->array[i]);
-      if (F_status_is_error(status)) return status;
-    } // for
-
-    return f_memory_array_resize(length, sizeof(f_thread_condition_attribute_t), (void **) &structure->array, &structure->used, &structure->size);
-  }
-#endif // !defined(_di_f_thread_condition_attributes_decrease_) || !defined(_di_f_thread_condition_attributes_decrease_by_) || !defined(_di_f_thread_condition_attributes_increase_) || !defined(_di_f_thread_condition_attributes_increase_by_)
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
diff --git a/level_0/f_thread/c/thread/private-condition_attribute.h b/level_0/f_thread/c/thread/private-condition_attribute.h
deleted file mode 100644 (file)
index 50e670d..0000000
+++ /dev/null
@@ -1,102 +0,0 @@
-/**
- * FLL - Level 0
- *
- * Project: Thread
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * These are provided for internal reduction in redundant code.
- * These should not be exposed/used outside of this project.
- */
-#ifndef _PRIVATE_F_thread_condition_attribute_h
-#define _PRIVATE_F_thread_condition_attribute_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * Private implementation for deleting (and destroying).
- *
- * Intended to be shared to each of the different implementation variations.
- *
- * @param length
- *   The new size to use.
- * @param structure
- *   The attribute to delete.
- *
- * @return
- *   F_none on success.
- *
- *   F_busy (with error bit) if the lock is busy.
- *   F_failure (with error bit) on error.
- *   F_parameter (with error bit) if a parameter is invalid.
- *
- * @see pthread_condattr_destroy()
- *
- * @see f_thread_condition_attributes_adjust()
- * @see f_thread_condition_attributes_decimate_by()
- * @see f_thread_condition_attributes_decrease()
- * @see f_thread_condition_attributes_decrease_by()
- * @see f_thread_condition_attributes_increase()
- * @see f_thread_condition_attributes_increase_by()
- * @see f_thread_condition_attributes_resize()
- */
-#if !defined(_di_f_thread_condition_attributes_adjust_) || !defined(_di_f_thread_condition_attributes_decimate_by_) || !defined(_di_f_thread_condition_attributes_decrease_) || !defined(_di_f_thread_condition_attributes_decrease_by_) || !defined(_di_f_thread_condition_attributes_increase_) || !defined(_di_f_thread_condition_attributes_increase_by_) || !defined(_di_f_thread_condition_attributes_resize_)
-  extern f_status_t private_f_thread_condition_attribute_delete(f_thread_condition_attribute_t *structure) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_thread_condition_attributes_adjust_) || !defined(_di_f_thread_condition_attributes_decimate_by_) || !defined(_di_f_thread_condition_attributes_decrease_) || !defined(_di_f_thread_condition_attributes_decrease_by_) || !defined(_di_f_thread_condition_attributes_increase_) || !defined(_di_f_thread_condition_attributes_increase_by_) || !defined(_di_f_thread_condition_attributes_resize_)
-
-/**
- * Private implementation for resizing.
- *
- * Intended to be shared to each of the different implementation variations.
- *
- * @param length
- *   The new size to use.
- * @param structure
- *   The condition_attributes to adjust.
- *
- * @return
- *   F_none on success.
- *
- *   Errors (with error bit) from: f_memory_array_resize().
- *
- * @see f_memory_array_resize()
- *
- * @see f_thread_condition_attributes_adjust()
- * @see f_thread_condition_attributes_decimate_by()
- */
-#if !defined(_di_f_thread_condition_attributes_adjust_) || !defined(_di_f_thread_condition_attributes_decimate_by_)
-  extern f_status_t private_f_thread_condition_attributes_adjust(const f_number_unsigned_t length, f_thread_condition_attributes_t * const structure) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_thread_condition_attributes_adjust_) || !defined(_di_f_thread_condition_attributes_decimate_by_)
-
-/**
- * Private implementation for resizing.
- *
- * Intended to be shared to each of the different implementation variations.
- *
- * @param length
- *   The new size to use.
- * @param structure
- *   The condition_attributes to resize.
- *
- * @return
- *   F_none on success.
- *
- *   Errors (with error bit) from: f_memory_array_resize().
- *
- * @see f_memory_array_resize()
- *
- * @see f_thread_condition_attributes_decrease_by()
- * @see f_thread_condition_attributes_increase()
- * @see f_thread_condition_attributes_increase_by()
- */
-#if !defined(_di_f_thread_condition_attributes_decrease_by_) || !defined(_di_f_thread_condition_attributes_increase_) || !defined(_di_f_thread_condition_attributes_increase_by_)
-  extern f_status_t private_f_thread_condition_attributes_resize(const f_number_unsigned_t length, f_thread_condition_attributes_t * const structure) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_thread_condition_attributes_decrease_by_) || !defined(_di_f_thread_condition_attributes_increase_) || !defined(_di_f_thread_condition_attributes_increase_by_)
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
-
-#endif // _PRIVATE_F_thread_condition_attribute_h
index a88cae12b395ab0f28208fef5171f5a68c781fce..a2ba2533cc7be7e193efa56fca76700ca4cfc806 100644 (file)
@@ -35,7 +35,6 @@ build_libraries -lc
 build_libraries-individual -lf_memory -lf_string
 
 build_sources_library thread.c thread/attribute.c thread/barrier.c thread/barrier_attribute.c thread/condition.c thread/condition_attribute.c thread/id.c thread/key.c thread/lock.c thread/lock_attribute.c thread/mutex.c thread/mutex_attribute.c thread/once.c thread/semaphore.c thread/set.c thread/spin.c
-build_sources_library thread/private-barrier.c thread/private-barrier_attribute.c thread/private-condition.c thread/private-condition_attribute.c
 
 build_sources_headers thread.h thread/attribute.h thread/barrier.h thread/barrier_attribute.h thread/condition.h thread/condition_attribute.h thread/id.h thread/key.h thread/lock.h thread/lock_attribute.h thread/mutex.h thread/mutex_attribute.h thread/once.h thread/semaphore.h thread/set.h thread/spin.h
 
index f6703b247a5ebdabee11b0bfd6e6c7dd5dcbefe0..e09a69db0cfbe3d2ccf836c4ebc4795922909a1f 100644 (file)
@@ -31,7 +31,6 @@ build_libraries -pthread -lc
 build_libraries-individual -lf_memory -lf_string
 
 build_sources_library thread.c thread/attribute.c thread/barrier.c thread/barrier_attribute.c thread/condition.c thread/condition_attribute.c thread/id.c thread/key.c thread/lock.c thread/lock_attribute.c thread/mutex.c thread/mutex_attribute.c thread/once.c thread/semaphore.c thread/set.c thread/spin.c ../../tests/unit/c/mock-thread.c
-build_sources_library thread/private-barrier.c thread/private-barrier_attribute.c thread/private-condition.c thread/private-condition_attribute.c
 
 build_sources_headers thread.h thread/attribute.h thread/barrier.h thread/barrier_attribute.h thread/condition.h thread/condition_attribute.h thread/id.h thread/key.h thread/lock.h thread/lock_attribute.h thread/mutex.h thread/mutex_attribute.h thread/once.h thread/semaphore.h thread/set.h thread/spin.h
 
index d77ebde97b5baf675573ddfef4f9c0d4b8f80ec3..2c10bebcb53df1544793519246140eed43219c16 100644 (file)
@@ -278,15 +278,11 @@ extern "C" {
     f_string_t fixed_arguments[arguments.used + 2];
     f_string_static_t program_name = f_string_static_t_initialize;
 
-    const f_string_t last_slash = (f_string_t) strrchr(
-      (program.used
-        ? program.string
-        : arguments.used && arguments.array[0].used
-          ? arguments.array[0].string
-          : 0
-      ),
-      (char) f_path_separator_s.string[0]
-    );
+    const f_string_t last_slash = program.used
+      ? (f_string_t) strrchr(program.string, (char) f_path_separator_s.string[0])
+      : arguments.used && arguments.array[0].used
+        ? (f_string_t) strrchr(arguments.array[0].string, (char) f_path_separator_s.string[0])
+        : 0;
 
     if (last_slash) {
       program_name.used = strnlen((last_slash + 1), F_path_length_max_d);
index 31ce70467b946a867dc49fcf6afff8e0a868d3ae..d8385d207a8c3bdabf2fcea4981cde449efc9c65 100644 (file)
@@ -47,7 +47,6 @@
 #include <fll/level_1/conversion.h>
 #include <fll/level_1/iki.h>
 #include <fll/level_1/print.h>
-#include <fll/level_1/signal.h>
 
 // FLL-2 includes.
 #include <fll/level_2/error.h>