>From: Terry Lambert <[EMAIL PROTECTED]>
>Reply-To: [EMAIL PROTECTED]
>To: [EMAIL PROTECTED]
>CC: [EMAIL PROTECTED], [EMAIL PROTECTED]
>Subject: Re: Invoking a userland function from kernel
>Date: Wed, 25 Jul 2001 00:16:33 -0700
>
>[EMAIL PROTECTED] wrote:
> >
> > I need pass asynchronously data from kernel
> > to a userland process, include a quantity variable of
> > data (void *opaque).
>
>The easiest way to do this is to have the user space process
>register a kevent, and then KNOTE() in the kernel when the
>event takes place.
>
>Another way to do this is to create a pseduo device driver,
>and read the data in user space.
>
>What it really sounds like you want is callbacks into user
>space from the kernel, a la VMS AST's (Asynchornous System
>Traps).  To implement true AST's, you need to know that the
>kernel runs in supervisor mode, and the user space runs in
>user mode, and that these correspond to "rong 0" and "ring 3"
>protection domains for protected mode Intel processors,
>respectively.  To implement AST's correctly, you would need
>to run them in "system mode", which in the Intel processor
>vernacular, would be "ring 2".

Just reading the system programming manual from Intel which says
"the processor does not allow a transfer of program control from a procedure 
running at CPL of 0, 1 or 2 to a procedure running at a CPL
of 3, except on a return."

Weiguang


_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to