Guest_imported
New member
- Jan 1, 1970
- 0
hello, i try to use the clone function because i want my two processes to share data. Unfortunatelly, whatever i do, the compiler tells me:
passing arg 1 of `clone' from incompatible pointer type
The man page of clone is:
int clone(int (*fn)(void *), void *child_stack, int flags,
void *arg);
So "fn" IS A POINTER TO A FUNCTION, so i tried this:
int (*pf)(int);
pf=&my_function;
clone(&pf,...);
I also tried clone(pf,...);clone(*pf,...);...very bad things
And i'm always said the same thing!
Thanks for your help.
thomas
passing arg 1 of `clone' from incompatible pointer type
The man page of clone is:
int clone(int (*fn)(void *), void *child_stack, int flags,
void *arg);
So "fn" IS A POINTER TO A FUNCTION, so i tried this:
int (*pf)(int);
pf=&my_function;
clone(&pf,...);
I also tried clone(pf,...);clone(*pf,...);...very bad things
And i'm always said the same thing!
Thanks for your help.
thomas