thread pool problem

hello everyone. I want to implement a thread pool, with 10 threads most. Inside main,I call a function (lets say it foo) wich creates (if it is needed) or uses an existing thread from the pool and sends it to do a job.My problem is that I dont know how to pass the argument from the main to the thread which will do the job. But when foo is creating or use a thread to do the job, passes to the thread the pool as an argument. But I want to pass also an other argument from main. So,in the case where foo creates a new thread and send it to do the job, I want to pass an other argument except from pool.But pthread_creat has only 1 argument.Also,in case foo uses an existing thread and wakes it up to do the job,how will foo can pass to that thread the argument??? I have already written most of the code for the pool,and this is one of the few things left,please help! thanks in advance

pthread_create has a void* argument for passing values.
create a struct that has as many arguments as you want, pass that.

typedef struct
{
   char string[64];
   double  dbl;
   int  intarg;
} my args_t;
// ...............
args_t myargs;
pthread_t tid;
myargs.dbl=32.3;
strcpy(myargs, "some string value");
myargs.intarg=42;
pthread_create(&tid, foo, NULL< &myargs);

in function foo()

foo(void *args)
{
     myargs_t *arg=(myargs_t *) args;
     printf("%d\n", arg->intarg); 
}

Great,Thanks a lot! although so obvious i couldnt see it!