diff options
author | Martin Mares <mj@ucw.cz> | 2000-01-18 12:01:03 +0100 |
---|---|---|
committer | Martin Mares <mj@ucw.cz> | 2000-01-18 12:01:03 +0100 |
commit | 3ea1ba632b3cdb5005a9339fd5e74d5f93631a48 (patch) | |
tree | a14df52aecd4a2fad742f47eed0682fb1044c8a2 /nest/proto.c | |
parent | 54aaa89ada2d048c64a5afd58844bc395b1a3cfe (diff) | |
download | bird-3ea1ba632b3cdb5005a9339fd5e74d5f93631a48.tar bird-3ea1ba632b3cdb5005a9339fd5e74d5f93631a48.zip |
Killed protocol->priority. Protocol startup should be clean and hack-free now.
It seems everything still works (except for disable/enable/restart which hangs
sometimes, but it's another story).
Diffstat (limited to 'nest/proto.c')
-rw-r--r-- | nest/proto.c | 21 |
1 files changed, 2 insertions, 19 deletions
diff --git a/nest/proto.c b/nest/proto.c index 81f3bd7..da75866 100644 --- a/nest/proto.c +++ b/nest/proto.c @@ -49,17 +49,7 @@ static void proto_rethink_goal(struct proto *p); static void proto_enqueue(list *l, struct proto *p) { - int pri = p->proto->priority; - - if (!pri) - add_tail(l, &p->n); - else - { - struct proto *q = HEAD(*l); - while (q->n.next && q->proto->priority >= pri) - q = (struct proto *) q->n.next; - insert_node(&p->n, q->n.prev); - } + add_tail(l, &p->n); p->last_state_change = now; } @@ -324,7 +314,7 @@ protos_dump_all(void) WALK_LIST(p, active_proto_list) { - debug(" protocol %s (pri=%d): state %s/%s\n", p->name, p->proto->priority, + debug(" protocol %s state %s/%s\n", p->name, p_states[p->proto_state], c_states[p->core_state]); if (p->in_filter) debug("\tInput filter: %s\n", filter_name(p->in_filter)); @@ -424,13 +414,6 @@ proto_notify_state(struct proto *p, unsigned ps) ASSERT(ops == PS_DOWN || ops == PS_START); ASSERT(cs == FS_HUNGRY); DBG("%s: Scheduling meal\n", p->name); - if (p->proto->priority) /* FIXME: Terrible hack to get synchronous device/kernel startup! */ - { - p->proto_state = ps; - p->core_state = FS_FEEDING; - proto_feed(p); - return; - } cs = FS_FEEDING; p->attn->hook = proto_feed; ev_schedule(p->attn); |