]> Kevux Git Server - fll/commit
Feature: Implement fll_program_standard_signal_received_wait().
authorKevin Day <Kevin@kevux.org>
Thu, 23 Jan 2025 06:53:25 +0000 (00:53 -0600)
committerKevin Day <Kevin@kevux.org>
Thu, 23 Jan 2025 06:53:25 +0000 (00:53 -0600)
commit66faec05f8948cf686d6bbf78d9c7c01c4a959a0
tree8f3c62a5b29562b0b8b19b93b43059fd9227274e
parent1df3833c51eb91e3ba715241d69ad1a3b601f7e1
Feature: Implement fll_program_standard_signal_received_wait().

The `fll_program_standard_signal_received_wait()` is now added because a lot of this code is repeated forr every single FLL program.

The `fll_program_standard_signal_received()` is refactored to return a status code to match the newly added `ll_program_standard_signal_received_wait()`.

The `status_signal` can now be moved into the main program settings structure.
The `status_signal` is renamed to `signal_status` to keep the naming more consistent.

This also exposes and fixes a race condition in how the pre-existing threaded signal handling is being used.
The check for `program.signal.id` that then opens a signal via `f_signal_open()` in the thread is not necessary because the signal id from the parent thread is preserved.
The `f_signal_close()` in the thread ends up prematurely closing the signal because the parent thread signal id is passed to the child thread.
The `main->program.signal.id == -1` checks in the signal check functions end up preventing the interrupt cancel from being triggered because of the `f_signal_close()` being called in a separate thread that shares the same signal id.
48 files changed:
build/stand_alone/byte_dump.config.h
build/stand_alone/example.config.h
build/stand_alone/fake.config.h
build/stand_alone/firewall.config.h
build/stand_alone/utf8.config.h
level_2/fll_program/c/private-program.c
level_2/fll_program/c/private-program.h
level_2/fll_program/c/program.c
level_2/fll_program/c/program.h
level_2/fll_program/c/program/common.h
level_3/byte_dump/c/main/common/type.h
level_3/byte_dump/c/main/signal.c
level_3/byte_dump/c/main/signal.h
level_3/example/c/main/common/type.h
level_3/example/c/main/signal.c
level_3/example/c/main/signal.h
level_3/fake/c/main/build/skeleton.h
level_3/fake/c/main/common/type.h
level_3/fake/c/main/fake.h
level_3/fake/c/main/make/load_fakefile.h
level_3/fake/c/main/make/operate_process.c
level_3/fake/c/main/make/operate_process.h
level_3/fake/c/main/signal.c
level_3/fake/c/main/signal.h
level_3/firewall/c/main/common/type.h
level_3/firewall/c/main/signal.c
level_3/firewall/c/main/signal.h
level_3/fss_identify/c/main/common/type.h
level_3/fss_identify/c/main/signal.c
level_3/fss_identify/c/main/signal.h
level_3/fss_read/c/main/common/type.h
level_3/fss_read/c/main/signal.c
level_3/fss_read/c/main/signal.h
level_3/fss_write/c/main/common/type.h
level_3/fss_write/c/main/signal.c
level_3/fss_write/c/main/signal.h
level_3/iki_read/c/main/common/type.h
level_3/iki_read/c/main/signal.c
level_3/iki_read/c/main/signal.h
level_3/iki_write/c/main/common/type.h
level_3/iki_write/c/main/signal.c
level_3/iki_write/c/main/signal.h
level_3/status_code/c/main/common/type.h
level_3/status_code/c/main/signal.c
level_3/status_code/c/main/signal.h
level_3/utf8/c/main/common/type.h
level_3/utf8/c/main/signal.c
level_3/utf8/c/main/signal.h