US 12,493,485 B2
Method and apparatus for processing interrupt request
Fangming Chai, Dongguan (CN); Wenjing Wang, Shenzhen (CN); and Kun Huang, Wuhan (CN)
Assigned to HUAWEI TECHNOLOIGES CO. LTD., Shenzhen (CN)
Filed by Huawei Technologies Co., Ltd., Shenzhen (CN)
Filed on Sep. 18, 2023, as Appl. No. 18/469,069.
Application 18/469,069 is a continuation of application No. PCT/CN2022/080992, filed on Mar. 15, 2022.
Claims priority of application No. 202110284998.2 (CN), filed on Mar. 17, 2021.
Prior Publication US 2024/0004695 A1, Jan. 4, 2024
Int. Cl. G06F 9/48 (2006.01); G06F 9/52 (2006.01)
CPC G06F 9/4812 (2013.01) [G06F 9/526 (2013.01)] 20 Claims
OG exemplary drawing
 
1. A method comprising:
receiving a first interrupt request requesting to execute a first operation, wherein requesting to execute the first operation comprises requesting to occupy a critical resource that cannot be simultaneously occupied by a plurality of second operations, and wherein the second operations comprise the first operation;
storing, when the first operation is not to be executed immediately, the first operation into a temporary storage area storing an operation that occupies the critical resource and that a received interrupt request requests to execute,
wherein storing the first operation into the temporary storage area is based on a context corresponding to the first interrupt request being a first interrupt context; and
wherein the first interrupt request is further for requesting to execute a third operation different from the first operation, and wherein the method further comprises:
executing the third operation;
when executing the third operation has ended:
return a second interrupt context corresponding to a second interrupt request; or
return a task context, wherein a second priority of the second interrupt request is lower than a first priority of the first interrupt request; and
wherein to return the task context and the task context indicates that the third operation does not occupy the critical resource includes:
setting a mutual exclusion flag;
reading and executing at least one operation temporarily stored in the temporary storage area, wherein the at least one operation comprises the first operation; and
clearing the mutual exclusion flag when the temporary storage area does not comprise a remaining operation.