From owner-man-jp-reviewer@jp.FreeBSD.org Mon Sep  8 06:23:46 2003
Received: (from daemon@localhost)
	by castle.jp.FreeBSD.org (8.11.6p2+3.4W/8.11.3) id h87LNko76097;
	Mon, 8 Sep 2003 06:23:46 +0900 (JST)
	(envelope-from owner-man-jp-reviewer@jp.FreeBSD.org)
Received: from rwcrmhc12.comcast.net (rwcrmhc12.comcast.net [216.148.227.85])
	by castle.jp.FreeBSD.org (8.11.6p2+3.4W/8.11.3) with ESMTP/inet id h87LNjw76078
	for <man-jp-reviewer@jp.freebsd.org>; Mon, 8 Sep 2003 06:23:46 +0900 (JST)
	(envelope-from horikawa@jp.freebsd.org)
Received: from localhost (12-252-35-167.client.attbi.com[12.252.35.167](untrusted sender))
          by comcast.net (rwcrmhc12) with SMTP
          id <2003090721233901400fe451e>; Sun, 7 Sep 2003 21:23:39 +0000
Message-Id: <20030907.152147.63131380.horikawa@attbi.com>
To: man-jp-reviewer@jp.FreeBSD.org, a_ikeuchi@mic.mitsumi.co.jp
From: Kazuo Horikawa <horikawa@jp.FreeBSD.org>
In-Reply-To: <3F568149.1080108@mic.mitsumi.co.jp>
References: <3F568149.1080108@mic.mitsumi.co.jp>
X-Mailer: Mew version 3.2 on Emacs 21.3 / Mule 5.0 (SAKAKI)
Mime-Version: 1.0
Content-Type: Text/Plain; charset=iso-2022-jp
Content-Transfer-Encoding: 7bit
Reply-To: man-jp-reviewer@jp.FreeBSD.org
Precedence: list
Date: Sun, 07 Sep 2003 15:21:47 -0600
X-Sequence: man-jp-reviewer 4508
Subject: [man-jp-reviewer 4508] Re: (man2) kse.2 (& Makefile)
Sender: owner-man-jp-reviewer@jp.FreeBSD.org
X-Originator: horikawa@jp.FreeBSD.org
X-Distribute: distribute version 2.1 (Alpha) patchlevel 24e+030902

$BKY@n$G$9!#(B

Akira Ikeuchi <a_ikeuchi@mic.mitsumi.co.jp> wrote:
> $BCSFb$G$9!#(B
> 
> man2 $B$N(B kse.2 $B$N=iLu$G$9!#(B
> $B%A%'%C%/$*4j$$$7$^$9!#(B
> Makefile $B$b=$@5$7$F$_$^$7$?!#(B
$B<!$N$h$&$KJQ99$7$F%3%_%C%H$7$?$$$H9M$($F$$$^$9!#(B

> +.\"
> +.Ss $B35MW(B
> +.\"
> +$BEAE}E*$K%f!<%6%9%l%C%G%#%s%0$O!"<!$N(B 2 $B$D$NJ}K!$N(B 1 $B$D$G<BAu$5$l$F$-$^$7$?!#(B
> +$BA4$F$N%9%l%C%I$O%f!<%66u4V$G4IM}$5$l!"%+!<%M%k$OA4$F$N%9%l%C%G%#%s%0$r(B
> +$BG'<1$7$^$;$s(B
         $B$J$$J}K!(B
> +.Dq ( "N $BBP(B 1"
> +$B$H$7$F$bCN$i$l$F$$$^$9(B)$B!#(B
> +$B$^$?$O!"8D!9$N%9%l%C%I$N$?$a$K6&DL$N%a%b%j6u4V$rJ,$19g$&(B
> +$BJ,N%$7$?%W%m%;%9$r:n@.$7$^$9(B
                         $B$9$kJ}K!(B
> +.Dq ( "N $BBP(B N"
> +$B$H$7$F$bCN$i$l$F$$$^$9(B)$B!#(B


> +$BG$0U$N?t$N%f!<%6%9%l%C%I$O!"%+!<%M%k$K$h$C$F6!5k$5$l$k8GDj?t$N2>A[(B CPU $B>e$K(B
> +$BJ#9g2=$5$l$^$9!#(B
   $BB?=E2=(B


>  .It
> -The thread makes any other demand of the kernel that cannot be immediately
> -satisfied, e.g., touches a page of memory that needs to be fetched from disk,
> -causing a page fault.
> +$B%9%l%C%I$,!"Nc$($P%G%#%9%/$+$i%G!<%?$rFI$_=P$9$?$a$KI,MW$J%a%b%j%Z!<%8$K(B
> +$B%"%/%;%9$9$k$3$H$G%Z!<%8%U%)%k%HH/@8$5$;$k$h$&$J!"(B
> +$B%+!<%M%k$,$9$0$K$OK~$?$9$3$H$,2DG=$G$O$J$$B>$NA4$F$NMW5a$r9T$J$&!#(B
$B%9%l%C%I$,!"(B
$B%+!<%M%k$,$9$0$K$OK~$?$9$3$H$,2DG=$G$O$J$$B>$NA4$F$NMW5a$r9T$J$&!#(B
$BNc$($P!"%G%#%9%/$+$i$NFI$_=P$7$,I,MW$J%a%b%j%Z!<%8$K(B
$B%"%/%;%9$9$k$3$H$G!"%Z!<%8%U%)%k%H$rH/@8$5$;$k$3$H$G$9!#(B


>  .It
> -Another thread that was previously blocked in the kernel completes its
> -work in the kernel (or is
> -.Sy interrupted )
> -and becomes ready to return to user space, and the current thread is returning
> -to user space.
> +$B%+!<%M%kFb$G@h$K%V%m%C%/$5$l$F$$$?B>$N%9%l%C%I$,!"%+!<%M%kFb$N$=$N:n6H$r(B
> +$B40N;$7(B ($B$^$?$O(B
> +.Sy $B3d$j9~$^$l(B )
> +$B!"%f!<%66u4V$XLa$k=`Hw$,$G$-!"$5$i$K8=:_$N%9%l%C%I$,%f!<%66u4V$KLa$C$F$$$k!#(B
                                                                   $BLa$m$&$H(B
$B$7$F$$$k!#(B


> +$B3d$jEv$F$i$l$F$$$J$$(B KSE $B$O>o$K2DG=$J8B$jAa$/!"(B
> +$B%f!<%6%W%m%;%9$,<!$KMxMQ$9$k$Y$-(B KSE $B$r$I$N$h$&$K7hDj$9$k$+$r2DG=$K$9$k(B
>  .Sy upcall
> +$B5!9=(B ($B2<5-$K5-=R$5$l$$$^$9(B) $B$r2p$7$F%f!<%66u4V$KLa$j$^$9!#(B
                   $B$5$l$F$$$^$9(B


> +$B$=$&$G$J$$>l9g$K$O!"$=$N?7$7$$(B KSE $B$O8=:_$N(B KSE $B%0%k!<%W$KDI2C$5$l$^$9!#(B
> +$B?7$7$/:n@.$5$l$k(B KSE $B$O:G=i$O3d$jEv$F$i$l$F$$$^$;$s!"$=$N$?$a!"(B
                                                      $B!#(B
> +$B$=$l$i$N(B KSE $B$OD>$A$K(B upcall $B$7$^$9!#(B


> -There may however be arbitrarily many user threads, and it is up to the
> -user thread scheduler to handle mapping the application's user threads
> -onto the available KSEs.
> +$B$I$s$J$KB?$/$NG$0U$N%f!<%6%9%l%C%I$,B8:_$9$k$3$H$K$J$C$F$b!"(B
> +$BMxMQ2DG=$J(B KSE $B$X$N%"%W%j%1!<%7%g%s$N%f!<%6%9%l%C%I$N3d$jEv$F$r<h$j07$&(B
> +$B$?$a$N%f!<%6%9%l%C%I%9%1%8%e!<%i$KEO$j$^$9!#(B
$BMxMQ2DG=$J(B KSE $B$X$N%"%W%j%1!<%7%g%s$N%f!<%6%9%l%C%I$N3d$jEv$F$r<h$j07$&(B
$B$N$O%f!<%6%9%l%C%I%9%1%8%e!<%i$N@UG$$G$9!#(B


> -As soon as the thread invokes an interruptible system call (or immediately
> -for threads already blocked in one), the thread will be made runnable again,
> -even though the kernel operation may not have completed.
> +$B%9%l%C%I$,3d$j9~$_$rH/@8$5$;$k%7%9%F%`%3!<%k$r<B9T$9$k$H$G$-$k$@$1(B
                   $B$^$l$k$3$H$,2DG=$J%7%9%F%`%3!<%k(B
> +$BAa$/(B ($B$^$?$O!"%9%l%C%I$,%+!<%M%k$NCf$G$9$G$K%V%m%C%/$5$l$F$k$HD>$A$K(B)$B!"(B
> +$B%+!<%M%kA`:n$,40N;$7$F$$$J$$$+$b$7$l$J$$$N$K$b$+$+$o$i$:!"(B
> +$B$=$N%9%l%C%I$O:FEY<B9T2DG=$K$5$l$^$9!#(B


>  .Pp
> -When
>  .Va km_curthread
> -is not
> -.Dv NULL ,
> -it is assumed to be pointing at the mailbox for the currently executing
> -thread, and the KSE may be unassigned, e.g., if the thread blocks in the
> -kernel.
> +$B$,(B
> +.Dv NULL
> +$B$G$O$J$$$H$-$K$O!"(B
> +$B8=:_<B9TCf$N%9%l%C%I$N%a!<%k%\%C%/%9$r;X$=$&$H;n$_!"$=$N(B KSE $B$O(B
$B$=$l$O8=:_<B9TCf$N%9%l%C%I$N%a!<%k%\%C%/%9$r;X$7$F$$$k$b$N$H$_$J$5$l!"(B
> +$B3d$jEv$F2r=|$5$l$k$3$H$,$G$-$^$9!#(B
> +$BNc$($P!"%9%l%C%I$,%+!<%M%kFb$G%V%m%C%/$9$k>l9g$G$9!#(B


> +.Em $BCm0U(B :
> +$B%f!<%6%9%l%C%I%9%1%8%e!<%i$K$h$k(B
>  .Va km_curthread
> -by the user thread scheduler must be atomic
> -with the loading of the context of the new thread, to avoid
> -the situation where the thread context area
> -may be modified by a blocking async operation, while there
> -is still valid information to be read out of it.
> +$B$NJQ99$O!"0MA3$H$7$FM-8z$J>pJs$,$=$3$+$iFI$_=P$5$l$k$Y$-;~$K(B
> +$B%V%m%C%-%s%0HsF14|A`:n$K$h$C$F!"%9%l%C%I$N%3%s%F%-%9%HNN0h$,(B
> +$BJQ99$5$l$k$+$b$7$l$J$$>u67$rHr$1$k$?$a$K!"(B
> +$B?7$7$$%9%l%C%I$N%3%s%F%-%9%H$N%m!<%I$K$D$$$FIT2DJ,$G$J$1$l$P$J$j$^$;$s!#(B
$B%f!<%6%9%l%C%I%9%1%8%e!<%i$K$h$k(B
.Va km_curthread
$B$NJQ99$O!"(B
$B?7$7$$%9%l%C%I$N%3%s%F%-%9%H$N%m!<%I$K$D$$$FIT2DJ,$G$J$1$l$P$J$j$^$;$s!#(B
$B0MA3$H$7$FM-8z$J>pJs$,$=$3$+$iFI$_=P$5$l$k$Y$-;~$K!"(B
$B%V%m%C%-%s%0HsF14|A`:n$K$h$C$F%9%l%C%I$N%3%s%F%-%9%HNN0h$,(B
$BJQ99$5$l$k$+$b$7$l$J$$>u67$rHr$1$k$?$a$G$9!#(B


>  .Pp
>  .Va km_sigscaught
> -contains the list of signals caught by this process since the previous
> -upcall to any KSE in the process.
> -As long as there exists one or more KSEs with an associated mailbox in
> -the user process, signals are delivered this way rather than the
> -traditional way.
> -(This has not been implemented and may change.)
> +$B$O$=$NA0$N%W%m%;%9Fb$NA4$F$N(B KSE $B$X$N(B upcall $B0J9_$K!"(B
> +$B$3$N%W%m%;%9$K$h$C$FJa$^$($i$l$?%7%0%J%k$N%j%9%H$,4^$^$l$F$$$^$9!#(B
> +$B$=$N%f!<%6%W%m%;%9$NCf$K(B 1 $B$D0J>e$N%a!<%k%\%C%/%9$K(B
> +$B4XO"IU$1$i$l$?(B KSE $B$,B8:_$9$k8B$j$O!"(B
$B$=$N%f!<%6%W%m%;%9$NCf$K!"(B
$B%a!<%k%\%C%/%9$K4XO"IU$1$i$l$?(B KSE $B$,(B 1 $B$D0J>eB8:_$9$k8B$j$O!"(B
> +$B%7%0%J%k$OEAE}E*$JJ}K!$G$O$J$/$3$NJ}K!$GG[?.$5$l$^$9!#(B
> +($B$3$l$O$^$@<BAu$5$l$F$*$i$:!"JQ99$5$l$k$+$b$7$l$^$;$s!#(B)


> -.Sh RETURN VALUES
> -The
> +.Sh $BLa$jCM(B
> +$B@.8y$N>l9g$K$O(B
>  .Fn kse_create ,
>  .Fn kse_wakeup ,
                 ^^$B%H%k(B
> -and
> +$B$*$h$S(B
>  .Fn kse_thr_interrupt
> -system calls
> -return zero if successful.
> -The
> +$B%7%9%F%`%3!<%k$O(B 0 $B$rJV$7$^$9!#(B


>  .It Bq Er EDEADLK
> -The current KSE is the last in its KSE group and there are still one or more
> -threads associated with the KSE group blocked in the kernel.
> +$B8=:_$N(B KSE $B$O$=$N(B KSE $B%0%k!<%WFb$N:G8e$G!"0MA3$H$7$F(B 1 $B$D0J>e$N%+!<%M%kFb$G(B
> +$B%V%m%C%/$5$l$?$=$N(B KSE $B%0%k!<%W$K4XO"IU$1$i$l$?%9%l%C%I$,B8:_$7$F$$$^$9!#(B

$B8=:_$N(B KSE $B$O$=$N(B KSE $B%0%k!<%WFb$N:G8e$G$"$j!"(B
$B%+!<%M%kFb$G%V%m%C%/$5$l$?$=$N(B KSE $B%0%k!<%W$K4XO"IU$1$i$l$?%9%l%C%I$,(B
$B0MA3$H$7$F(B 1 $B$D0J>eB8:_$7$F$$$^$9!#(B
--
$BKY@nOBM:(B
