I am trying to write a program that passes information from the kernel space to the user space on ububtu 14.04. I declared a struct
as the follows:
typedef struct
{
long pid;
char TTY[64];
unsigned long long time;
char COMM[64]
} myTasks;
In main, I then create an array of myTasks
structs like:
struct myTasks taskInfo[2500];
//do stuff
syscall(__NR_my_syscall2,numTasks,sizeof(taskInfo),taskInfo); // use it here
However, when I do that, I get a error on this line saying:
struct myTasks taskInfo[2500] Error: array type has incomplete element
What am I doing wrong? I wanted to create an array of myTasks
structs that I could pass as a buffer to a syscall... but I can't figure out what I'm doing wrong. I'm new to C
so any help would be greatly appreciated.