framework/csimanager: fix/improve error handling and resource management#7174
Open
rajat-samsung wants to merge 1 commit intoSamsung:masterfrom
Open
Conversation
e80da5b to
e2241df
Compare
4e1c5a3 to
9e96c9f
Compare
vibhor-m
reviewed
Apr 21, 2026
| return; | ||
| } | ||
|
|
||
| if (info->status == TM_APP_STATE_RUNNING) { |
Contributor
There was a problem hiding this comment.
This condition does not ensure, that stop will be called only when task_func is running. Hence running check can be removed.
| csi_data_len = msg.data_len; | ||
| len = readCSIData(fd, get_data_buffptr, csi_data_len); | ||
| last_data_read_timestamp_us = get_monotonic_time_us(); | ||
| CSIFW_LOGD("last_data_read_timestamp_us after readCSIData:%llu",last_data_read_timestamp_us); |
Contributor
There was a problem hiding this comment.
CSIFW_LOGD("CSI Data read complete %llu", get_monotonic_time_us());
| return CSIFW_OK; | ||
| } | ||
|
|
||
| static unsigned long long get_monotonic_time_us(void) |
Contributor
There was a problem hiding this comment.
This function will be called lot of times.
this function should be inline
OR
This function can be a pre-processer
| consecutive_failures++; | ||
| if (consecutive_failures >= MAX_CONSECUTIVE_FAILURES) { | ||
| CSIFW_LOGE("CRITICAL: %d consecutive Message received size error", consecutive_failures); | ||
| consecutive_failures = 0; |
Contributor
There was a problem hiding this comment.
consecutive_failures & timeout_count are in success path and will be set to 0 always. This may be a redundant operation performed in default path
9e96c9f to
dd96d56
Compare
- Renamed CSIFW_INVALID_RAWDATA to CSIFW_ERROR_DATA_NOT_AVAILABLE for clearer error reporting - Fixed logic error in add_service function for proper buffer management - Implemented timeout handling in message queue operations to prevent indefinite blocking - Added consecutive failure detection mechanism to prevent system lockups - Improved resource management with proper pthread attribute cleanup - Added configurable timeout option for CSI data collection - Fixed preprocessor directive logic for custom device path configuration - Enhanced error reporting with more descriptive messages and callback notifications - Removed invalid csi config enable after wifi reconnect - Added task_manager stop and unregister
dd96d56 to
702fd2a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This commit enhances the Channel State Information (CSI) framework with improved error handling, resource management, and robustness: