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 */
static void run_fsm(void)
{
enum action res;
switch(res = phase()) {
case Ok: case Fail:
pi_unclaim(pi_current);
next_request(res);
break;
case Wait:
pi_unclaim(pi_current);
/* fallthrough */
case Claim:
pi_do_claimed(pi_current, run_fsm);
break;
case Hold:
ps_set_intr();
while (1) {
enum action res;
switch(res = phase()) {
case Ok: case Fail:
pi_unclaim(pi_current);
next_request(res);
return;
case Wait:
pi_unclaim(pi_current);
/* fallthrough */
case Claim:
if (!pi_schedule_claimed(pi_current, run_fsm))
return;
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