Check-in Number:
|
2766 | |
Date: |
2002-Nov-08 11:34:24 (local)
2002-Nov-08 10:34:24 (UTC) |
User: | mlelstv |
Branch: | |
Comment: |
add SIO_LOOP status to simplify protocol state machine
PR:
Submitted by:
Reviewed by:
Approved by:
Obtained from: |
Tickets: |
|
Inspections: |
|
Files: |
|
ossp-pkg/sio/sio.c 1.8 -> 1.9
--- sio.c 2002/11/05 16:53:55 1.8
+++ sio.c 2002/11/08 10:34:24 1.9
@@ -133,6 +133,8 @@
h = PREV(h,hd);
else if (rc == SIO_XSTREAM)
h = h->cross;
+ else if (rc == SIO_LOOP)
+ h = h;
else
break;
}
@@ -609,6 +611,7 @@
case SIO_UPSTREAM: mess = "Invoke Upstream Stage"; break;
case SIO_DOWNSTREAM: mess = "Invoke Downstream Stage"; break;
case SIO_XSTREAM: mess = "Invoke Crossstream Stage"; break;
+ case SIO_LOOP: mess = "Loop through current Stage"; break;
default: mess = "Invalid Result Code"; break;
}
|
|
ossp-pkg/sio/sio.h 1.3 -> 1.4
--- sio.h 2002/11/07 15:29:53 1.3
+++ sio.h 2002/11/08 10:34:24 1.4
@@ -40,7 +40,8 @@
SIO_ERR_INT,
SIO_UPSTREAM,
SIO_DOWNSTREAM,
- SIO_XSTREAM
+ SIO_XSTREAM,
+ SIO_LOOP
} sio_rc_t;
typedef enum {
|
|
ossp-pkg/sio/sio_hello.c 1.3 -> 1.4
--- sio_hello.c 2002/11/05 17:20:22 1.3
+++ sio_hello.c 2002/11/08 10:34:24 1.4
@@ -254,22 +254,12 @@
if (isoutput) {
my->isoutput = 1;
hello_saveoutput(my);
- GOTO(PROMPTING, SIO_UPSTREAM);
- /*
- * FALL THROUGH to next state
- *
- * XXX = fall through is ugly
- * XXX + efficient, no extra pass through scheduler
- * XXX - scheduler doesn't support loops yet, we
- * could simulate this with extra states that
- * ping-pong back to the "right" side (ugh!)
- */
+ GOTO(PROMPTING, SIO_LOOP);
} else {
my->isoutput = 0;
GOTO(PROMPTING, SIO_XSTREAM);
- break;
}
- /* FALL THROUGH */
+ break;
case PROMPTING:
|
|