우리는 boch 시뮬레이터에 빌드 된 커널을 구현하려고한다.컴파일 할 때 배열 타입이 불완전한 원소 타입 에러를 가지고있다.
하위 작업 중 하나는 고정 된 우선 순위 일정을 구현하는 것입니다. 이전에 우리의 스케줄러는 단지 하나의 쓰레드 큐 였지만, 이제는 쓰레드 큐의 배열을 만들고 싶었습니다.
하지만 배열에 comiler 오류가 계속 발생합니다. 배열 유형에 불완전한 요소 유형이 있습니다. 아래 코드 중 일부를 게시했는데, 누구든지이 문제를 볼 수 있습니다.
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. */
};
...
어떤 줄이 오류 메시지의 원인입니까? –