Commit 7e396129 authored by Alexander Viro's avatar Alexander Viro Committed by Linus Torvalds

[PATCH] paride cleanup and fixes (14/25)

Equivalent transformation:
	call of pi_do_claimed() in run_fsm() expanded; recursive
	call of run_fsm() replaced with loop.
parent 1a2300d3
...@@ -215,21 +215,25 @@ static struct request *pd_req; /* current request */ ...@@ -215,21 +215,25 @@ static struct request *pd_req; /* current request */
static void run_fsm(void) static void run_fsm(void)
{ {
enum action res; while (1) {
enum action res;
switch(res = phase()) {
case Ok: case Fail: switch(res = phase()) {
pi_unclaim(pi_current); case Ok: case Fail:
next_request(res); pi_unclaim(pi_current);
break; next_request(res);
case Wait: return;
pi_unclaim(pi_current); case Wait:
/* fallthrough */ pi_unclaim(pi_current);
case Claim: /* fallthrough */
pi_do_claimed(pi_current, run_fsm); case Claim:
break; if (!pi_schedule_claimed(pi_current, run_fsm))
case Hold: return;
ps_set_intr(); break;
case Hold:
ps_set_intr();
return;
}
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment