CN1635476A - Loading interrupt service method - Google Patents

Loading interrupt service method Download PDF

Info

Publication number
CN1635476A
CN1635476A CN 200310113044 CN200310113044A CN1635476A CN 1635476 A CN1635476 A CN 1635476A CN 200310113044 CN200310113044 CN 200310113044 CN 200310113044 A CN200310113044 A CN 200310113044A CN 1635476 A CN1635476 A CN 1635476A
Authority
CN
China
Prior art keywords
interrupt
service routine
interval
service
functional parameter
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN 200310113044
Other languages
Chinese (zh)
Inventor
刘权辉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Kinpo Electronics Inc
Original Assignee
Kinpo Electronics Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Kinpo Electronics Inc filed Critical Kinpo Electronics Inc
Priority to CN 200310113044 priority Critical patent/CN1635476A/en
Publication of CN1635476A publication Critical patent/CN1635476A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

This invention relates to a hanging interval service method, which comprises the following steps: first registering at least one interval affair relative to one interval source and plugging one function order into the calling order in the interval service program of interval source; executing the service program pointed by the all function order of the interval program when there is interval; anti-registering the interval affair when not needing the service program and removing the function orders from the interval service program calling orders.

Description

Carry the break in service method of hanging
Technical field
The invention relates to a kind of break in service method, refer in particular to a kind of extension break in service method of carrying that is applicable to embedded system.
Background technology
In the design of embedded system, normally provide system required function with a single-chip, and in the framework of this single-chip, generally provide the mechanism of interruption (Interrupt), with when in system, having specific incident to take place, single-chip will stop present processing and carry out the pairing interrupt service routine of interrupt event (Interrupt Service Routine, ISR), to serve this interruption, so, system can control the formula that single-wafer processing need be handled at present at reasonable time, so that effectively use the hardware resource.
Fig. 1 shows the Organization Chart of interrupt mechanism, wherein, 12 planning of interruptable controller have the pairing interrupt vector of each interrupt source, when interrupt source 11 is sent an interruption, system will carry out interrupt vector interrupt service routine pointed, yet, in the design of single-chip, one interrupt source 11 is sent when interrupting, still need and look the condition that interrupt to take place (time of Fa Shenging for example, the reason that takes place etc.) distinguish out different interrupt events, and different service routine in the execution interrupt service routine, therefore in the time of will carrying out interrupt service routine interrupting taking place, because judge needs to carry out which service routine, so must use global variable (global variable) to write down the interrupt event that interrupt source produces, so could correctly carry out interrupt service routine.
From the above, known interrupt mechanism need use global variable and will judge that therefore, efficient is not good with the service routine that will carry out of decision, and service routine determined when compiling, can't change when carrying out, also lack flexibility.Therefore, how can avoid aforesaid disappearance and provide one effectively and the flexible interrupt mechanism of tool, become a problem that needs to be resolved hurrily then.
Summary of the invention
The objective of the invention is is providing a kind of year extension break in service method, dynamically real estate is given birth to required interruption, and can not carry out unnecessary judgement fully in the time need not interrupting, and saves unnecessary global variable, and service routine can upgrade after compiling again, and can simplify the maintenance that comes source code.
For reaching above-mentioned purpose, a kind of year of providing of the present invention hangs the break in service method, comprises step:
(A) registration is inserted a functional parameter corresponding at least one interrupt event of an interrupt source with the call instruction in the interrupt service routine of this interrupt source, and this functional parameter points to the service routine of a correspondence;
(B) when this interrupt source produces interruption, all functions index service routine pointed in the call instruction of execution interrupt service routine;
(C) instead register at least one registered interrupt event, remove the functional parameter of this interrupt event in the call instruction with this interrupt service routine certainly.
Hung the break in service method in described year, wherein in step (A), interrupt event is with log-in command REG, the fp registration, in step (C), interrupt event is with anti-log-in command UNREG, fp removes, and wherein, fp is the functional parameter of the service routine of corresponding this desire registration interruption of a sensing.
Hung the break in service method in described year, wherein when a plurality of interrupt events were registered, the functional parameter of these a plurality of interrupt events was with link tandem moor string together, when giving birth to central broken hair, carries out all functions index service routine pointed.
By above explanation as can be known, the present invention dynamically produces required interruption by providing registration and anti-registration to interrupt, in the time need not interrupting, can not carry out unnecessary judgement fully, save unnecessary global variable, and service routine can be after compiling upgrades again, and can simplify the maintenance that comes source code.
Description of drawings
Fig. 1 is known interrupt mechanism synoptic diagram;
Fig. 2 is the applied environment figure of of the present invention year extension break in service method;
Fig. 3 shows of the present invention year to hang an example of break in service method.
Embodiment
For allowing your juror can more understand technology contents of the present invention, preferable concrete especially exemplified by one
Embodiment is described as follows.
Hung the break in service method in relevant of the present invention year, please be earlier with reference to applied environment figure shown in Figure 2, wherein, planning has an interrupt source 21 pairing interrupt vectors in the interruptable controller 22, when interrupting to produce in interrupt source 21, start this interrupt vector, wherein, the interruption that this interrupt source 21 produces can be different interrupt events.One registration/anti-accreditation process 23 then is to interrupt or instead register this interruption in order to dynamically to register one.
Interruption registration/anti-log-in command the parameter that aforementioned registration/anti-accreditation process 23 is provided comprises fp, REGCtrl, Mode and interval, and wherein, fp is the functional parameter of the service routine of corresponding this desire registration interruption of a sensing; REGCtrl can insert REG or UNREG represents registration or anti-log-in command; Mode can insert CONTINUOUS or ONE SHOT, with the interruption generation behavior of expression registration for recur or only single take place, if recur, then interval represents the origination interval time, if single takes place, time of origin after interval represents to register.
As shown in the figure, interrupt by using registration and anti-registration timing, dynamically produce required interrupt event, for example, when giving birth to, central broken hair need carry out service routine A, just can log-in command REG, fpA comes to system registry, system will insert the instruction of calling out fpA (call fpA) in the interrupt service routine that interrupt vector is pointed to, wherein, fpA points to service routine A, afterwards, if decision also needs to carry out service routine B when interrupting taking place, can be again with log-in command REG, fpB comes to system registry, this moment is if there be idle the interruption, then be written in idle the interruption, if there be not idle the interruption, the interruption of then getting the interval minimum comes the computing greatest common factor as interval, and fpB will go here and there in the mode of link tandem (link list) in system after calling out fpA, and further calculate performance period of two, and being separated with regional parameter, the cycle for the treatment of takes place then to be carried out.Wherein, fpB points to service routine B, therefore, will carry out service routine A and service routine B when interrupting taking place, and in this way, call instruction can be connected in series many functional parameters, to carry out the pairing service routine of these functional parameters.And if decision has not needed to carry out service routine B when interrupt taking place, then can anti-log-in command UNREG, fpB comes the cancellation service routine B to system, system will remove fpB in the link tandem of call instruction, and upgrade the interval value once more, and the relevant operation that increases or remove functional parameter in the link tandem newly is the technology for the physical data structure, is not described in detail in this.
Fig. 3 shows an example, wherein when t1 with log-in command REG, fpA and REG, fpB comes to system registry, so service routine A and B are carried out in interruption when taking place, when t2 with log-in command REG, fpC and REG, fpD come to system registry, thus execution service routine A, B, C and D when interrupting taking place, when t3 with anti-log-in command UNREG, fpC comes to register to system is counter, so execution service routine A, B and D when interrupting taking place.
The foregoing description only is to give an example for convenience of description, and the interest field that the present invention advocated should be as the criterion so that claim is described certainly, but not only limits to the foregoing description.

Claims (3)

1, hang the break in service method in a kind of year, it is characterized in that, comprise step:
(A) registration is inserted a functional parameter corresponding at least one interrupt event of an interrupt source with the call instruction in the interrupt service routine of this interrupt source, and this functional parameter points to the service routine of a correspondence;
(B) when this interrupt source produces interruption, all functions index service routine pointed in the call instruction of execution interrupt service routine;
(C) instead register at least one registered interrupt event, remove the functional parameter of this interrupt event in the call instruction with this interrupt service routine certainly.
2, hung the break in service method in according to claim 1 year, it is characterized in that, wherein in step (A), interrupt event is with log-in command REG, and the fp registration is in step (C), interrupt event is with anti-log-in command UNREG, fp removes, and wherein, fp is the functional parameter of the service routine of corresponding this desire registration interruption of a sensing.
3, hung the break in service method in according to claim 2 year, it is characterized in that wherein when a plurality of interrupt events were registered, the functional parameter of these a plurality of interrupt events was with link tandem moor string together, when giving birth to, carry out all functions index service routine pointed with central broken hair.
CN 200310113044 2003-12-25 2003-12-25 Loading interrupt service method Pending CN1635476A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 200310113044 CN1635476A (en) 2003-12-25 2003-12-25 Loading interrupt service method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 200310113044 CN1635476A (en) 2003-12-25 2003-12-25 Loading interrupt service method

Publications (1)

Publication Number Publication Date
CN1635476A true CN1635476A (en) 2005-07-06

Family

ID=34843407

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 200310113044 Pending CN1635476A (en) 2003-12-25 2003-12-25 Loading interrupt service method

Country Status (1)

Country Link
CN (1) CN1635476A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100458709C (en) * 2005-12-08 2009-02-04 国际商业机器公司 Method and system for interrupting blocking in server safely

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100458709C (en) * 2005-12-08 2009-02-04 国际商业机器公司 Method and system for interrupting blocking in server safely

Similar Documents

Publication Publication Date Title
US20170004005A1 (en) Exception handling in microprocessor systems
CN109710312A (en) RISC-V instruction set based real-time interrupt processing method and device and industrial control processor
EP1879108A1 (en) Method and computer system for restarting an operating system without interrupting operation of other different operating systems running concurrently to said operating system
CN106293781B (en) The method and apparatus of online upgrading machine virtual machine
EP1975769A3 (en) Method and apparatus for unified storage system
CN100465893C (en) Embedded operation system driver dynamic update method
CN110275722A (en) Method, apparatus, equipment and storage medium for upgrade application
AU2003293331A8 (en) Method of booting a computer operating system to run from a normally unsupported system device
FR2752471A1 (en) DEVICE AND METHOD FOR PROCESSING SOFTWARE INTERRUPTIONS WITH ARGUMENT TRANSFER
JP5050019B2 (en) Source code analysis system
US20180336030A1 (en) Reducing stalling in a simultaneous multithreading processor by inserting thread switches for instructions likely to stall
CN107908444A (en) The hook method and device of terminal applies
CN102436393B (en) Task treatment device
CN101980147A (en) Multithreaded processor and instruction execution and synchronization method thereof and computer program product
CN107526622A (en) Rapid exception handling method and device for Linux
CN113641378B (en) Optical module program upgrading method, device, equipment and readable storage medium
CN1635476A (en) Loading interrupt service method
CN1924802A (en) Self-upgrading method for updating program
CN106874072B (en) Embedded operating system partition virtual interrupt processing method based on PowerPC processor
CN102567251B (en) Control method and control device for BIOS (basic input/output system)
WO2016017943A1 (en) Master pattern generation method and apparatus for determining normal operation of automated process
KR20110057297A (en) Dynamic analyzing system for malicious bot and methods therefore
CN111638965B (en) Command queue inter-fence synchronization method and system based on fence replication and handshake
EP1616257A2 (en) Operating systems
CN105868003B (en) A kind of task context switching optimization method based on TMS320C6747

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C02 Deemed withdrawal of patent application after publication (patent law 2001)
WD01 Invention patent application deemed withdrawn after publication