Paul Durrant wrote:
> On 04/09/07, Joachim Worringen <[EMAIL PROTECTED]> wrote:
>> I'm porting a driver from Linux to (Open)Solaris. The driver uses its own 
>> threads, which under Linux are created with a simple kernel_thread() call. I 
>> don't see such a call under Solaris. A solution could be to create a task 
>> queue with a single thread, and commit a single task to this queue, which 
>> then runs until the driver eventually is stopped. Is this feasible, or are 
>> there other, "cleaner" solutions?
> 
> I'm sure there are many solutions involving taskqs/timeout/cyclics
> that could be arrived it. However, you *can* create a thread;
> thread_create() will do it for you (I think it's in kthread.c). I
> don't believe it's in the DDI, but IMO it should be as it can be
> highly useful.

Thanks Paul, our posts just crossed. Of course there would be other ways 
to implement the functionality we need as you indicated, but the driver 
is rather complex and I don't want to change the design right now, but 
would rather do a straight (but clean) port to get it running.

As I hesitate to use non-public interfaces, I will try the taskq 
approach. The documentation does mention limits on the execution time of 
a task within a queue, so it should work.

  Joachim

-- 
Joachim Worringen, Software Architect, Dolphin Interconnect Solutions
phone ++49/(0)228/324 08 17 - http://www.dolphinics.com
_______________________________________________
opensolaris-code mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code

Reply via email to