Check patentability & draft patents in minutes with Patsnap Eureka AI!

A Refactoring Method to Reduce Non-reentrant Functions

A function and reentrancy technology, applied in the field of reconstruction to reduce non-reentrant functions, can solve problems such as resource conflicts and low system stability, and achieve the effects of reducing coupling, reducing the risk of resource conflicts, and being easy to monitor and track.

Active Publication Date: 2021-12-03
HUIZHOU DESAY SV AUTOMOTIVE
View PDF5 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

Inevitably, there are more or less non-reentrant functions in the system. Since the non-reentrant functions access global resources, when they are called concurrently by multiple tasks, it is easy to cause resource conflicts.
[0003] The greater the number of non-reentrant functions, the greater the risk of resource conflicts and the lower the system stability. Therefore, some methods need to be used to reduce the non-reentrant functions in software modules to reduce the risk of resource conflicts

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • A Refactoring Method to Reduce Non-reentrant Functions
  • A Refactoring Method to Reduce Non-reentrant Functions
  • A Refactoring Method to Reduce Non-reentrant Functions

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0042] A refactoring method to reduce non-reentrant functions. By rebuilding the encapsulation function, the state of some non-reentrant functions is effectively transformed into reentrant functions, and a new calling relationship is constructed at the same time. Greatly reduce the resource usage of non-reentrant functions. The specific reconstruction method in this embodiment includes steps, please refer to figure 1 :

[0043] S10. Identify a non-reentrant function.

[0044] Specifically, during processing, the external interface of the software module code is analyzed to analyze the implementation functions associated with the external interface, and the calling relationship between the implementation functions is recorded, and all non-reentrant functions are identified.

[0045] Specifically, such as figure 2 As shown, this step adopts the following sub-steps when identifying non-reentrant functions:

[0046] S11. In the embedded system, it is necessary to define vario...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The present invention relates to a refactoring method for reducing non-reentrant functions, comprising the following steps: S10, analyzing and realizing the calling relationship between functions according to the external interface, and identifying all non-reentrant functions; S20, constructing a function calling relationship mapping table , classifying the non-reentrant functions based on different global resources; S30, constructing an encapsulation function separately for each global resource, and using the encapsulation function as a new call interface for the corresponding non-reentrant function to call. The beneficial effects of the reconfiguration method for reducing non-reentrant functions of the present invention include: 1. Effectively reduce non-reentrant functions in software modules, reducing the risk of resource conflicts during multi-task operation. 2. The degree of coupling between functions is further reduced, which improves the testability of the code. 3. The function's access to global resources is more centralized, and it is easy to monitor and track when the program is running. 4. The refactored function call relationship is clearer.

Description

technical field [0001] The invention relates to the field of modulation and reception of vehicle broadcast signals, in particular to a reconstruction method for reducing non-reentrant functions. Background technique [0002] At present, most embedded products use a multi-task preemptive system. In this multi-task preemptive software environment, it is particularly important to avoid global resource preemption conflicts. It is unavoidable that there are more or less non-reentrant functions in the system. Since the non-reentrant functions access global resources, when they are called concurrently by multiple tasks, it is easy to cause resource conflicts. [0003] The greater the number of non-reentrant functions, the greater the risk of resource conflicts and the lower the system stability. Therefore, some methods need to be used to reduce the non-reentrant functions in software modules to reduce the risk of resource conflicts. Contents of the invention [0004] In order to...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Patents(China)
IPC IPC(8): G06F9/448
CPCG06F9/448
Inventor 方加强胡嘉维方泽文
Owner HUIZHOU DESAY SV AUTOMOTIVE
Features
  • R&D
  • Intellectual Property
  • Life Sciences
  • Materials
  • Tech Scout
Why Patsnap Eureka
  • Unparalleled Data Quality
  • Higher Quality Content
  • 60% Fewer Hallucinations
Social media
Patsnap Eureka Blog
Learn More