Re: Threading and Synchronization in Mass storage driver
Re: Threading and Synchronization in Mass storage driver
- Subject: Re: Threading and Synchronization in Mass storage driver
- From: Herb Petschauer <email@hidden>
- Date: Wed, 30 Nov 2005 08:53:06 -0800
Hmm, I barely remember this thread (keeping the original subject and
quoting the original thread would have been great) but...
So:
typedef void (*IOThreadFunc)(void *argument);
IOThread IOCreateThread(IOThreadFunc function, void *argument);
What's your definition of handle_request_loop?
>From the compile error it looks like you are defining it (within your class) as
static (I hope) void * handle_request_loop( void *arg);
rather than
static void handle_request_loop( void *arg);
which it needs to be to conform to IOThreadFunc.
In no way should you have to cast to an IOThreadFunc, this screams
ERROR (as does the panic on driver load)...
Does this help?
Cheers,
H.
On 30 Nov 2005 11:02:34 +0530, Yogesh P <email@hidden> wrote:
> Hi Herb,
>
> As per you suggetions, I had tried using following thread call,
>
> IOCreateThread(com_My_driver::handle_request_loop,
> (void*) &thr_id[i]);
>
> But I am getting following error during compilation of my driver.
>
> error: no matches converting function 'handle_request_loop' to type
> 'void (*) (void*)'
> error: candidates are: void* com_My_driver::handle_request_loop(void*)
>
> When I tried out the following call, I am not getting the compilation
> error but my driver gets crash as soon as it calls IOCreateThread
> function.
>
> IOCreateThread((IOThreadFunc)&com_My_driver::handle_request_loop,
> (void*) &thr_id[i]);
>
> Please suggest to solve this problem.
>
> Thanks in advance,
> Yogesh Pahilwan
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Darwin-kernel mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden