The first kse_create call

Daniel Eischen eischen at vigrid.com
Tue Jun 17 13:54:33 PDT 2003


> Hi,
> 
> I'm trying to run simple program with kse. As I understood the very
> first kse_create call does not create KSE but just assigns the mailbox
> to the existing "default" KSE and makes upcall. May be I'm doing
> something wrong,
> but I never got upcall on the first kse. When I create another KSE (and
> another KSE group) I immediatelly get the upcall for this (second) KSE.
> Just interesting how does it work - may be the first KSE has special
> behavior?

This is the correct behavior.  The first kse_create() does not
generate an immediate upcall.  It only flags the current context
as being a KSE.  An upcall in this initial KSE will take place
under the same conditions as other KSEs (KSE mailbox has a thread
mailbox pointer and thread blocks, quantum expires, etc).
Subsequent kse_create() calls will generate upcalls immediately
(well, at the mercy of the kernel scheduler).

-- 
Dan Eischen



More information about the freebsd-threads mailing list