Home > Back-end >  Using C language to achieve soft switching ~ ~ ~ ~
Using C language to achieve soft switching ~ ~ ~ ~

Time:10-05

Problem: the function is A priority for 10, function priority for 7 B, C function priority of 8, the priority of the smaller the number, the higher priority levels, suppose function A began to run, B is A high priority at this moment function activated, because priority is higher than A B function, so B; But at this time to activate again B C function, C function priority is lower than B, C does not perform, to be performed to execute C B, then A perform finally,
Function of the activation sequence A - & gt; B - & gt; C
Request execution sequence is A - & gt; Activated B - & gt; B - & gt; Activated C - & gt; Back to perform - B & gt; Executive C - & gt; Using A
With C language to write the soft switching function principle is what? This implementation needs to call library function?
Wait for master ~ ~ ~ ~ ~
Design problem: when activated B found B's priority is higher, at this moment need not return A, and direct B (the equivalent of one simple function call), and B C enabled found don't call immediately, and return to B continue; B performed after, how can I will jump directly are executed A, C cannot perform ah, don't know the thinking of design A great god ~ ~ ~ ~ o show · · · · · · ·

CodePudding user response:

  • Related