Re: Threading and Synchronization in Mass storage driver
site_archiver@lists.apple.com Delivered-To: darwin-kernel@lists.apple.com Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=qTlI3ChjaPikb+arFQ3qCiFhXiU8IPmKVD9kGFxoBaUH376mvaKzELjcsBETguINjB0XQPrisCi+vIdNYS2uW2h+YAlIvRUJiV9rU1aBWTebgPe10k9FkpE0cDdkPvIyXRgEPQT2ddgzKO+YSCWz6+QlAHY8/r+PcDjGzLxJZq0= 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 <pahilwan.yogesh@spsoftindia.com> 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 (Darwin-kernel@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-kernel/bogvardi%40gmail.com
This email sent to bogvardi@gmail.com
_______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-kernel mailing list (Darwin-kernel@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-kernel/site_archiver%40lists.a... This email sent to site_archiver@lists.apple.com
participants (1)
-
Herb Petschauer