DragonFly kernel List (threaded) for 2008-05
DragonFly BSD
DragonFly kernel List (threaded) for 2008-05
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: #ifdef _KERNEL in lwkt_thread.c


From: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxx>
Date: Sun, 18 May 2008 09:51:12 -0700 (PDT)

:Hello,
:
:kern/lwkt_thread.c can apparently be compiled both as kernel and user
:land code (cf #ifdef _KERNEL in file).  What's the purpose of this?
:Was it just initially developed user-side then ported into the kernel
:or is there something else?
:
:Thanks,
:Nicolas

    Originally I tested the core mechanics in userland, and had an idea
    to use it for the userland thread scheduler in a NxM configuration
    (N kernel threads x M userland threads per kernel thread), using
    async system calls.

    That never worked out... it was just too complex and implementing async
    system calls turned out to be basically impossible without rewriting
    the entire kernel.  So the module is no longer intended to be compiled
    for userland.

					-Matt
					Matthew Dillon 
					<dillon@backplane.com>



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]