From 4e6e12a6a2ad696ab734b0be305a5fdcb78bcdf2 Mon Sep 17 00:00:00 2001 From: nvhaizi1 Date: Sun, 29 May 2022 13:13:46 +0800 Subject: [PATCH] =?UTF-8?q?dev=E9=87=8C=E7=9A=84FCFSQuery=E5=87=BD?= =?UTF-8?q?=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/controller.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/controller.c b/src/controller.c index bd52255..decb9bc 100644 --- a/src/controller.c +++ b/src/controller.c @@ -13,5 +13,14 @@ int FCFSDirection() bus_query_t *FCFSQuery() { - return NULL; + bus_query_t *p = queries; + if (the_bus->rail_node_pos == p->node) + { + return p; + } + else + { + queries = queries->next_node; + return NULL; + } } \ No newline at end of file