hello!
I've a problem with the clone.. Its definition is as follows:

Code:
 int clone(int (*fn)(void *), void *child_stack, int flags, void *arg, .../* pid_t *pid, struct user_desc *tls, pid_t *ctid */ );
if I define a simple
Code:
 int function(void *unused)
everything's ok: i can call for example
Code:
clone ((int (*)(void *)function,&stack[1024],....
or also just
Code:
clone (function,&stack....
the problem is if i want to cast the void* to, e.g. an int*
i tried to do things like
Code:
int function (int *nPtr){...}
int a;
clone((int(*)(int *)function(&a),....
clone (function ((int *)&a), ...
but nothing works... where is the mistake? thank for every answer!