You have to comply with the assigned interface, but such interface would probably make your Fibonacci series computation rather clumsy. I suggest you to separate the tasks: write a fibonacci function complying with the required interface wich, in turn, calls a trivial recursive implementation (say myfib) of the series computation:
#include struct args
{
int number;
int result;
};
// trivial recursive implementation on Fibonacci series computation
static int myfib( int n )
{
if ( n < 3 )
return 1;
else
return myfib(n-1) + myfib(n-2);
}
// the interface compliant function
void fibonacci( void * arguments )
{
struct args * pargs = (struct args *) arguments;
pargs->result = myfib( pargs->number); // call the private workhorse
}
// test program
int main()
{
struct args a = { 10, 0 };
fibonacci( &a );
printf("fibonacci(%d)=%d\n", a.number, a.result);
return 0;
}