]> Kevux Git Server - fll/commitdiff
Update: Remove unused fl_signal and fl_signal_state_interrupt.
authorKevin Day <kevin@kevux.org>
Thu, 27 Jul 2023 03:44:21 +0000 (22:44 -0500)
committerKevin Day <kevin@kevux.org>
Thu, 27 Jul 2023 03:44:21 +0000 (22:44 -0500)
The fl_signal_state_interrupt() function is not used and is replaced by fll_program_standard_signal_received().

The entire fl_signal can be and is removed.

14 files changed:
build/disable/level_1/fl_signal.h [deleted file]
build/level_1/settings
build/monolithic/settings
build/scripts/bootstrap-example.sh
build/scripts/test.sh
level_1/fl_signal/c/signal.c [deleted file]
level_1/fl_signal/c/signal.h [deleted file]
level_1/fl_signal/c/signal/common.h [deleted file]
level_1/fl_signal/data/build/defines [deleted file]
level_1/fl_signal/data/build/dependencies [deleted file]
level_1/fl_signal/data/build/fakefile [deleted file]
level_1/fl_signal/data/build/settings [deleted file]
level_3/iki_read/data/build/dependencies
level_3/iki_read/data/build/settings

diff --git a/build/disable/level_1/fl_signal.h b/build/disable/level_1/fl_signal.h
deleted file mode 100644 (file)
index e045811..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-#define _di_fl_signal_interrupt_t_
-#define _di_fl_signal_state_interrupt_
index 3cb05e11f8c1e6edc5415d6ab5f57c9ccf36587a..924c12e07e8f0630b8f8c25a7b488b9642f3f3dd 100644 (file)
@@ -42,7 +42,6 @@ build_sources_library private-fss.c fss/basic.c fss/basic_list.c fss/embedded_li
 build_sources_library iki.c
 build_sources_library path.c
 build_sources_library print.c private-print.c print/common.c
-build_sources_library signal.c
 build_sources_library status_string.c
 build_sources_library utf_file.c private-utf_file.c
 
@@ -55,7 +54,6 @@ build_sources_headers fss.h fss/basic.h fss/basic_list.h fss/embedded_list.h fss
 build_sources_headers iki.h
 build_sources_headers path.h
 build_sources_headers print.h print/common.h
-build_sources_headers signal.h signal/common.h
 build_sources_headers status_string.h
 build_sources_headers utf_file.h
 
index ae95a173928414dd7a95aa8b45e2cf091b7967aa..6a50e2875e1ea15719924f4d1a630aa9aed047ab 100644 (file)
@@ -99,7 +99,6 @@ build_sources_library level_1/private-fss.c level_1/fss/basic.c level_1/fss/basi
 build_sources_library level_1/iki.c
 build_sources_library level_1/path.c
 build_sources_library level_1/print.c level_1/private-print.c level_1/print/common.c
-build_sources_library level_1/signal.c
 build_sources_library level_1/status_string.c
 build_sources_library level_1/utf_file.c level_1/private-utf_file.c
 
@@ -163,7 +162,6 @@ build_sources_headers level_1/fss.h level_1/fss/basic.h level_1/fss/basic_list.h
 build_sources_headers level_1/iki.h
 build_sources_headers level_1/path.h
 build_sources_headers level_1/print.h level_1/print/common.h
-build_sources_headers level_1/signal.h level_1/signal/common.h
 build_sources_headers level_1/status_string.h
 build_sources_headers level_1/utf_file.h
 
index 7398f55504c6b779c05fee9e1b875aa509d388f6..a09f7e657fdfb58beac5243a47aaee9730bce934 100644 (file)
@@ -130,7 +130,7 @@ if [[ ${1} == "individual" ]] ; then
   ${shell_command} build/scripts/package.sh ${verbose} ${color} rebuild -i
 
   if [[ ${?} -eq 0 ]] ; then
-    for i in f_type f_status f_memory f_type_array f_string f_utf f_account f_capability f_color f_compare f_console f_control_group f_conversion f_directory f_environment f_execute f_file f_fss f_iki f_limit f_network f_parse f_path f_pipe f_print f_rip f_status_string f_serialize f_signal f_socket f_thread fl_control_group fl_conversion fl_directory fl_environment fl_execute fl_fss fl_iki fl_path fl_print fl_signal fl_status_string fl_utf_file fll_control_group fll_error fll_execute fll_file fll_fss fll_fss_status_string fll_iki fll_print fll_program ; do
+    for i in f_type f_status f_memory f_type_array f_string f_utf f_account f_capability f_color f_compare f_console f_control_group f_conversion f_directory f_environment f_execute f_file f_fss f_iki f_limit f_network f_parse f_path f_pipe f_print f_rip f_status_string f_serialize f_signal f_socket f_thread fl_control_group fl_conversion fl_directory fl_environment fl_execute fl_fss fl_iki fl_path fl_print fl_status_string fl_utf_file fll_control_group fll_error fll_execute fll_file fll_fss fll_fss_status_string fll_iki fll_print fll_program ; do
       echo && echo "Processing ${i}." &&
 
       cd package/individual/${i}-${version}/ &&
index 2d20b758366ef9a4f1060cfc5a6e663df4dad0cd..870078d118a87cdd2440aeda7ff19ff3c1fa7a83 100644 (file)
@@ -71,7 +71,7 @@ test_main() {
   local verbose=
   local verbose_common=
 
-  local projects="f_type f_status f_memory f_type_array f_string f_utf f_account f_capability f_color f_compare f_console f_control_group f_conversion f_directory f_environment f_execute f_file f_fss f_iki f_limit f_network f_parse f_path f_pipe f_print f_rip f_serialize f_signal f_socket f_status_string f_thread fl_control_group fl_conversion fl_directory fl_environment fl_execute fl_fss fl_iki fl_path fl_print fl_signal fl_status_string fl_utf_file fll_control_group fll_error fll_execute fll_file fll_fss fll_fss_status_string fll_iki fll_print fll_program"
+  local projects="f_type f_status f_memory f_type_array f_string f_utf f_account f_capability f_color f_compare f_console f_control_group f_conversion f_directory f_environment f_execute f_file f_fss f_iki f_limit f_network f_parse f_path f_pipe f_print f_rip f_serialize f_signal f_socket f_status_string f_thread fl_control_group fl_conversion fl_directory fl_environment fl_execute fl_fss fl_iki fl_path fl_print fl_status_string fl_utf_file fll_control_group fll_error fll_execute fll_file fll_fss fll_fss_status_string fll_iki fll_print fll_program"
   local projects_no_tests="f_type"
   local programs="fss_read"
 
diff --git a/level_1/fl_signal/c/signal.c b/level_1/fl_signal/c/signal.c
deleted file mode 100644 (file)
index d915c27..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-#include "signal.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifndef _di_fl_signal_state_interrupt_
-  f_status_t fl_signal_state_interrupt(void * const state, void * const internal) {
-    #ifndef _di_level_1_parameter_checking_
-      if (!state) return F_status_set_error(F_parameter);
-    #endif // _di_level_1_parameter_checking_
-
-    f_state_t *state_ptr = (f_state_t *) state;
-
-    if (!state_ptr->custom) {
-      return F_status_set_error(F_parameter);
-    }
-
-    fl_signal_interrupt_t *signal_interrupt = (fl_signal_interrupt_t *) state_ptr->custom;
-
-    if (!signal_interrupt || !signal_interrupt->signal.id) {
-      return F_enable_not;
-    }
-
-    if (!signal_interrupt->interrupts.used) {
-      return F_interrupt_not;
-    }
-
-    struct signalfd_siginfo information;
-
-    memset(&information, 0, sizeof(struct signalfd_siginfo));
-
-    const f_status_t status = f_signal_read(signal_interrupt->signal, 0, &information);
-
-    if (F_status_set_fine(status) == F_interrupt) {
-      for (f_number_unsigned_t i = 0; i < signal_interrupt->interrupts.used; ++i) {
-
-        if (information.ssi_signo == signal_interrupt->interrupts.array[i]) {
-          signal_interrupt->trigger = information.ssi_signo;
-
-          return F_status_set_error(F_interrupt);
-        }
-      } // for
-    }
-
-    return F_interrupt_not;
-  }
-#endif // _di_fl_signal_state_interrupt_
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
diff --git a/level_1/fl_signal/c/signal.h b/level_1/fl_signal/c/signal.h
deleted file mode 100644 (file)
index 6e19732..0000000
+++ /dev/null
@@ -1,68 +0,0 @@
-/**
- * FLL - Level 1
- *
- * Project: Signal
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Provides common signal functions.
- */
-#ifndef _FL_signal_h
-#define _FL_signal_h
-
-// Libc includes.
-#include <signal.h>
-#include <string.h>
-#include <sys/signalfd.h>
-
-// FLL-0 includes.
-#include <fll/level_0/type.h>
-#include <fll/level_0/status.h>
-#include <fll/level_0/signal.h>
-
-// FLL-1 signal includes.
-#include <fll/level_1/signal/common.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * Check to see if a given signal is received.
- *
- * Provides a simple interrupt checker for general use.
- *
- * This is intended to be explicitly use for the interrupt() callback defined in f_state_t.
- *
- * This checks all interrupts provided in state->data.interrupts and if a signal is found, store that signal in state->data.trigger and returns F_interrupt (with error bit set).
- * If state->data.signal.id is NULL, then F_enable_not is returned.
- *
- * @param state
- *   The state such that:
- *   - state->handle:    Ignored.
- *   - state->interrupt: A pointer to this function.
- *   - state->callbacks: Ignored.
- *   - state->custom:    The interrupt data, of the type fl_signal_interrupt_t (Must not be NULL).
- *   - state->data:      Ignored.
- * @param internal
- *   This is ignored.
- *
- * @return
- *   F_none on success.
- *   F_enable_not on success but signals are not requested to be processed.
- *   F_interrupt_not on success and no requested signal was found.
- *
- *   F_interrupt (with error bit) if a requested signal is confirmed to be found.
- *   F_parameter (with error bit) if a parameter is invalid.
- *
- * @see f_signal_read()
- */
-#ifndef _di_fl_signal_state_interrupt_
-  extern f_status_t fl_signal_state_interrupt(void * const state, void * const internal);
-#endif // _di_fl_signal_state_interrupt_
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
-
-#endif // _FL_signal_h
diff --git a/level_1/fl_signal/c/signal/common.h b/level_1/fl_signal/c/signal/common.h
deleted file mode 100644 (file)
index da86c49..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-/**
- * FLL - Level 1
- *
- * Project: Signal
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Defines common data to be used for/by project execute.
- *
- * This is auto-included by execute.h and should not need to be explicitly included.
- */
-#ifndef _FL_signal_common_h
-#define _FL_signal_common_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * A structure intended to be used as the "data" structure for f_state_t for interrupt related functionality.
- *
- * Properties:
- *   - interrupts: An array of signal codes to treat as interrupts.
- *   - signal:     The signal structure to use.
- *   - trigger:    The signal that triggered the interrupt, if applicable.
- */
-#ifndef _di_fl_signal_interrupt_t_
-  typedef struct {
-    f_int32s_t interrupts;
-    f_signal_t signal;
-    int32_t    trigger;
-  } fl_signal_interrupt_t;
-
-  #define fl_signal_interrupt_t_initialize { f_int32s_t_initialize, f_signal_t_initialize, 0 }
-
-  #define macro_fl_signal_interrupt_t_initialize_1(interrupts, signal) { interrupts, signal, 0 }
-  #define macro_fl_signal_interrupt_t_initialize_2(interrupts, signal, trigger) { interrupts, signal, trigger }
-
-  #define macro_fl_signal_interrupt_t_clear(structure) \
-    macro_f_int32s_t_clear(structure.interrupts) \
-    macro_f_signal_t_clear(structure.signal) \
-    structure.trigger = 0;
-#endif // _di_fl_signal_interrupt_t_
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
-
-#endif // _FL_signal_common_h
diff --git a/level_1/fl_signal/data/build/defines b/level_1/fl_signal/data/build/defines
deleted file mode 100644 (file)
index c665317..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-# fss-0000
-
diff --git a/level_1/fl_signal/data/build/dependencies b/level_1/fl_signal/data/build/dependencies
deleted file mode 100644 (file)
index 01e8165..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-# fss-0000
-
-f_type
-f_status
-f_signal
diff --git a/level_1/fl_signal/data/build/fakefile b/level_1/fl_signal/data/build/fakefile
deleted file mode 100644 (file)
index 90a7134..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-# fss-0005 iki-0002
-
-settings:
-  fail exit
-  modes individual individual_thread level monolithic clang test fanalyzer thread threadless
-
-  environment PATH LD_LIBRARY_PATH
-  environment LANG LC_ALL LC_COLLATE LC_CTYPE LC_FASTMSG LC_MESSAGES LC_MONETARY LC_NUMERIC LC_TIME LOCPATH NLSPATH
-
-main:
-
-  build
diff --git a/level_1/fl_signal/data/build/settings b/level_1/fl_signal/data/build/settings
deleted file mode 100644 (file)
index a384c62..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-# fss-0001
-#
-# Modes:
-#   - individual:        Compile using per project (individual) libraries, does not handle thread or threadless cases.
-#   - individual_thread: This is required when compiling in individual mode with "thread" mode.
-#   - level:             Compile using per level libraries.
-#   - monolithic:        Compile using per monolithic libraries.
-#   - clang:             Use clang rather than the default, which is generally gcc.
-#   - test:              Compile for a test, such as unit testing.
-#   - fanalyzer:         Compile using GCC's -fanalyzer compile time option.
-#   - thread:            Compile with thread support.
-#   - threadless:        Compile without thread support.
-#
-
-build_name fl_signal
-
-version_major 0
-version_minor 7
-version_micro 0
-version_file micro
-version_target minor
-
-modes individual individual_thread level monolithic clang test fanalyzer thread threadless
-modes_default individual individual_thread thread
-
-build_compiler gcc
-build_compiler-clang clang
-build_indexer ar
-build_indexer_arguments rcs
-build_language c
-
-build_libraries -lc
-build_libraries-individual -lf_signal
-
-build_sources_library signal.c
-
-build_sources_headers signal.h signal/common.h
-
-build_script yes
-build_shared yes
-build_static no
-
-path_headers fll/level_1
-path_library_script script
-path_library_shared shared
-path_library_static static
-path_object_script script
-path_object_shared shared
-path_object_static static
-path_program_script script
-path_program_shared shared
-path_program_static static
-
-has_path_standard yes
-preserve_path_headers yes
-
-search_exclusive yes
-search_shared yes
-search_static yes
-
-environment PATH LD_LIBRARY_PATH
-environment LANG LC_ALL LC_COLLATE LC_CTYPE LC_FASTMSG LC_MESSAGES LC_MONETARY LC_NUMERIC LC_TIME LOCPATH NLSPATH
-
-flags -O2 -z now -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno-parentheses
-flags-clang -Wno-logical-op-parentheses
-flags-test -O0 -fstack-protector -Wall
-flags-coverage -O0 --coverage -fprofile-abs-path -fprofile-dir=build/coverage/
-
-flags_library -fPIC
-flags_object -fPIC
-flags_program -fPIE
index 606d0580a3f452880b481ae7153e948b062a584c..e0e68d790da885be885b82cecd6a20036540fed8 100644 (file)
@@ -21,7 +21,6 @@ f_thread
 fl_conversion
 fl_iki
 fl_print
-fl_signal
 
 fll_error
 fll_print
index 7a6873ca4806a369baae6fced9eaf05ff471d43d..318257b5dcd0dc3e97e6cf995c39c04b530ff039 100644 (file)
@@ -30,7 +30,7 @@ build_indexer_arguments rcs
 build_language c
 
 build_libraries -lc
-build_libraries-individual -lfll_error -lfll_print -lfll_program -lfl_conversion -lfl_iki -lfl_print -lfl_signal -lf_color -lf_compare -lf_console -lf_conversion -lf_file -lf_iki -lf_memory -lf_pipe -lf_print -lf_rip -lf_signal -lf_string -lf_type_array -lf_utf
+build_libraries-individual -lfll_error -lfll_print -lfll_program -lfl_conversion -lfl_iki -lfl_print -lf_color -lf_compare -lf_console -lf_conversion -lf_file -lf_iki -lf_memory -lf_pipe -lf_print -lf_rip -lf_signal -lf_string -lf_type_array -lf_utf
 build_libraries-individual_thread -lf_thread
 build_libraries-level -lfll_2 -lfll_1 -lfll_0
 build_libraries-monolithic -lfll