I am implementing a queue to control the threads created, in C
. So while the thread
is not the first in the queue it waits to be terminated.
example:
//
// Enquanto não é primeira da fila
//
while(idd != PPFila.dados[PPFila.primeiro])
{
//
// Aguarda
//
GEDI_CLOCK_Delay(50);
}
and in this line while(idd != PPFila.dados[PPFila.primeiro])
displays 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
)
obs, I'm using them from another file with extern
extern struct Fila
PPFila,
AUTFila;
Does anyone have any tips how can I resolve this?