Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7882849
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T04:22:57+00:00 2026-06-03T04:22:57+00:00

In our class we are to implement a kernel built on a bochs simulator.

  • 0

In our class we are to implement a kernel built on a bochs simulator.

One of the subtasks is to implement fixed priority scheduling. Previously our scheduler was only one thread queue, but now i wanted to make an array of thread queues.

But my array keeps getting a comiler error “array type has incomplete element type” i posted some of the code below, can anyone see the problem.

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. */
};
...
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T04:22:58+00:00Added an answer on June 3, 2026 at 4:22 am

    You need to have the definition of the structure whos array you create before creating the array(the compiler needs to see the definition of type whos array you create), othewise the type is an Incomplete type for the compiler and it does not know the memory layout of that type and hence cannot create an array of it.

    You should put the definition of the structure in a header file and include it whichever files you want to refer to structure elements or do some action which needs the compiler to know of the structure layout.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We use derived Form-Classes, with one base form class for our software. On the
I'm taking a compiler-design class where we have to implement our own compiler (using
Currently I am exploring Quartz scheduler for one of our projects. While I am
As part of our homework we are asked to implement an abstract class with
If we don't want to implement init method in our class, and bearing in
our assignment is to implement a linked list class to do the following with
I've decided to implement a caching facade in one of our applications - the
We use a mixture of 32-bit and 64-bit development environments. Some of our class
I am in a web scripting class and our teacher is very strict on
A brief preface: I'm in a game design class where our project for the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.