Management method for embedded system timer

An embedded system and management method technology, applied in the field of embedded system timer management, can solve the problem of occupying too many system resources, and achieve the effect of saving system resources

Inactive Publication Date: 2009-02-04
BEIJING JIAXUN FEIHONG ELECTRIC CO LTD
View PDF0 Cites 21 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0013] The purpose of the present invention is to provide a management method for embedded system timers, through this method, the problem of occupying too many system resources in the currently used timer management method can be solved

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
  • Management method for embedded system timer
  • Management method for embedded system timer
  • Management method for embedded system timer

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0051] Below is the data structure of the present invention that C language realizes, mainly comprises:

[0052]1) The doubly linked list structure of the management timer:

[0053] typedef struct tagTimer

[0054] {

[0055] struct tagTimer *pstNext; / / backward pointer

[0056] struct tagTimer *pstPrev; / / forward pointer

[0057] ULONG msgQId; / / Timer message queue ID

[0058] VOID (*pfFu nc)(VOID*); / / timeout callback function

[0059] VOID *pAr g; / / parameter of the callback function

[0060] TIMER_TYPE_EN enType; / / Timer type (one-time timer or

[0061] periodic timer)

[0062] LONG lTick; / / Timer length

[0063] LONG lTickGap; / / Time difference with the previous timer

[0064] ULONG ulModuleId; / / Register the module number of the timer

[0065]}Timer_S;

[0066] 2) Link list header structure:

[0067] typedef struct

[0068] {

[0069] Timer_S *head; / / The first timer structure p...

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 invention discloses a management method for an embedded system timer in the technical field of embedded system timer management. The technical proposal comprises the following steps: a two-way link list for managing the timers with the minimum size being 1 TICK is created; the timers are registered in the link list; when each TICK arrives the time, the head part of the link list starts checking the overtime status of the timers until reaching the first time which does not exceed the time; all the overtime timers are canceled from the two-way link list; according to the registering status of the canceled timers, messages or function callbacks are respectively sent to a registering module; and the overtime periodic timers can be automatically registered into the link list, or else, the timers are released. As the method adopts a two-way link list for management, the timers apply the memory during the registering, while the memory is released upon canceling; the memory overhead is decided by the current number of the timers, so as to effectively save the system memory.

Description

technical field [0001] The invention belongs to the technical field of embedded system timer management, and in particular relates to a management method of an embedded system timer. Background technique [0002] The real-time operating system has very strict requirements on the time limit, and the real-time operating system has a strong dependence on the timing deviation. Therefore, the design and implementation of the timer module, which is the core module of real-time embedded system software time management, is very important. [0003] At present, the general-purpose timer design of embedded system software mainly has the following types: [0004] (1) Simple timing polling method [0005] When each timing cycle arrives, firstly subtract 1 from the counting numbers of all timers, and then judge whether the result is 0. If it is 0, it means that the timing time has come and the time-out processing will be performed; otherwise, the timing operation will continue. The meth...

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 Applications(China)
IPC IPC(8): G06F9/48
Inventor 隋平礼单洪政
Owner BEIJING JIAXUN FEIHONG ELECTRIC CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products