私たちのクラスでは、bochsシミュレーター上に構築されたカーネルを実装します。
サブタスクの1つは、固定優先度スケジューリングを実装することです。以前はスケジューラーは1つのスレッドキューしかありませんでしたが、今はスレッドキューの配列を作成したいと思いました。
しかし、私の配列は「配列型の要素型が不完全です」というコミラーエラーが発生し続けます。以下のコードの一部を投稿しました。誰でも問題を確認できます。
kernel.h
...
extern struct thread_queue
ready_queue_table[MAX_SYS_PRIORITY];
...
kernel.c
...
#include <sysdefines.h>
#include "threadqueue.h"
...
struct thread_queue
ready_queue_table[MAX_SYS_PRIORITY];
...
sysdefines.h
...
#define MAX_SYS_PRIORITY (5)
...
threadqueue.h
...
struct thread_queue
{
int head; /*!< The index to the head of the thread queue.
Is -1 if queue is empty. */
int tail; /*!< The index to the tail of the thread queue.
Is -1 if queue is empty. */
};
...