]> Kevux Git Server - fll/commit
Update: Improve read program logic to allow for catching interrupts during file read.
authorKevin Day <thekevinday@gmail.com>
Thu, 7 Apr 2022 05:49:09 +0000 (00:49 -0500)
committerKevin Day <thekevinday@gmail.com>
Thu, 7 Apr 2022 05:49:09 +0000 (00:49 -0500)
commitb1dddea0ecf4aecfe0c7965b1b40b2432ce47b8a
treeb5de2659aa639b3e02d01dc883d626b6f548c4a9
parent9c8e5a96825241562809396cbd82e44bb909c298
Update: Improve read program logic to allow for catching interrupts during file read.

Introduce break points in the read process by establishing an outer block loop.
Add the signal check before each block read.
There may need to be additional, smaller checks to further reduce how often the signal check is performed within these loops.

Make sure to use the file stream read rather than the file read.

Calculate the file size and pre-allocate the buffer.
Determine the exact size needed to avoid additional reallocations by utilizing the modulus operator.

The fss_embedded_read is notably out of day and inconsistent with the rest of the fss read programs.
This is only partially updated enough to work with the changes.
14 files changed:
level_3/fss_basic_list_read/c/fss_basic_list_read.c
level_3/fss_basic_list_read/c/private-common.h
level_3/fss_basic_read/c/fss_basic_read.c
level_3/fss_basic_read/c/private-common.h
level_3/fss_embedded_list_read/c/fss_embedded_list_read.c
level_3/fss_embedded_list_read/c/private-common.h
level_3/fss_extended_list_read/c/fss_extended_list_read.c
level_3/fss_extended_list_read/c/private-common.h
level_3/fss_extended_read/c/fss_extended_read.c
level_3/fss_extended_read/c/private-common.h
level_3/fss_payload_read/c/fss_payload_read.c
level_3/fss_payload_read/c/private-common.h
level_3/iki_read/c/iki_read.c
level_3/iki_read/c/private-common.h