0
I’m implementing a queue to control the threads created, in C
. So as the thread
is not the first in line she waits to be finished.
example:
//
// Enquanto não é primeira da fila
//
while(idd != PPFila.dados[PPFila.primeiro])
{
//
// Aguarda
//
GEDI_CLOCK_Delay(50);
}
and on that line while(idd != PPFila.dados[PPFila.primeiro])
shows the following error: error: error: invalid use of undefined type 'struct Fila
.
Excerpts:
Struct:
struct Fila
{
int capacidade;
int *dados;
int primeiro;
int ultimo;
int nItens;
};
Function:
void funcao
(
char *as_comando_buffer,
int an_codigo_retorno,
char *as_output,
int an_output_lenght,
int idd
)
BS, I’m using them from another file with extern
extern struct Fila
PPFila,
AUTFila;
Does anyone have any tips how I can fix this?
Show the statement of
idd
.– DaviAragao
ready, added
– Lucas Fernandes
You’re probably missing one
#include
in the file where you have the function with the while cycle. I assume that there is no definition ofstruct Fila
active and compiler complains.– pmg