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%P!<%8%g%s;2>H(B
ref_sys
$B%7%9%F%`>uBV;2>H(B
ref_chg
$B%3%s%U%#%0%l!<%7%g%s>pJs;2>H(B
$B$J$7(B
def_svc
$B3HD%(BSVC$B%O%s%I%iDj5A(B
def_exc
$BNc30%O%s%I%iDj5A(B

4.9 $B%M%C%H%o!<%/%5%]!<%H5!G=(B

4.10 ID$B<+F03dEv5!G=(B

vcre_tsk
$B%?%9%/@8@.(B (ID$B<+F03dEv(B)($B5!G=%3!<%I(B: -241)
$B!Z%Q%i%a!<%?![(B
T_CTSK* pk_ctsk     $B%?%9%/@8@.>pJs(B
$B!Z%j%?!<%s%Q%i%a!<%?![(B
ER      ercd        $B@8@.$7$?%?%9%/$N(BID, $B%(%i!<%3!<%I(B
$B!Z(BC$B8@8l%$%s%?%U%'!<%9![(B
ER ercd =vcre_tsk(T_CTSK *pk_ctsk);
$B!Z2r@b![(B

ID $BHV9f$r;XDj$;$:$K%?%9%/$r@8@.$7!"(B $B@8@.$7$?%?%9%/$N(B ID ($BI,$:@5$NCM(B) $B$r(Bercd $B$KJV$9!#(B ercd$B$,Ii$N>l9g$O!"%(%i!<%3!<%I$rI=$9!#(B $B3d$jEv$F2DG=$J(B ID $B$,$J$$>l9g!"(BEV_FULL $B%(%i!<$H$J$k!#(B $B$=$NB>$K$D$$$F$O!"(Bcre_tsk $B$HF1$8$G$"$k!#(B

vcre_sem
$B%;%^%U%)@8@.(B (ID$B<+F03dEv(B)($B5!G=%3!<%I(B: -242)
$B!Z%Q%i%a!<%?![(B
T_CSEM* pk_csem     $B%;%^%U%)@8@.>pJs(B
$B!Z%j%?!<%s%Q%i%a!<%?![(B
ER      ercd        $B@8@.$7$?%;%^%U%)$N(BID, $B%(%i!<%3!<%I(B
$B!Z(BC$B8@8l%$%s%?%U%'!<%9![(B
ER ercd =vcre_sem(T_CSEM *pk_csem);
$B!Z2r@b![(B

ID$BHV9f$r;XDj$;$:$K%;%^%U%)$r@8@.$7!"(B $B@8@.$7$?%;%^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%O%s%I%i$NDj5A2r=|$r9T$&5!G=$O$J$$!#(B $B$=$NB>$K$D$$$F$O!"(Bdef_cyc $B$HF1$8$G$"$k!#(B

vdef_alm
$B%"%i!<%`%O%s%I%iDj5A(B($B5!G=%3!<%I(B: -256)
$B!Z%Q%i%a!<%?![(B
T_DALM* pk_dalm     $B%"%i!<%`%O%s%I%iDj5A>pJs(B
$B!Z%j%?!<%s%Q%i%a!<%?![(B
ER      ercd        $BDj5A$7$?%"%i!<%`%O%s%I%i$NHV9f(B, $B%(%i!<%3!<%I(B
$B!Z(BC$B8@8l%$%s%?%U%'!<%9![(B
ER ercd =vdef_alm(T_DALM *pk_dalm);
$B!Z2r@b![(B

$BHV9f$r;XDj$;$:$K%"%i!<%`%O%s%I%i$rDj5A$7!"(B $BDj5A$7$?%"%i!<%`%O%s%I%i$NHV9f(B ($BI,$:@5$NCM(B) $B$r(B ercd $B$KJV$7$^$9(B ercd $B$,Ii$N>l9g$O!"%(%i!<%3!<%I$rI=$9!#(B $B3d$jEv$F2DG=$JHV9f$,$J$$>l9g!"(BEV_FULL$B%(%i!<$H$J$k!#(B $B$^$?!"(Bpk_dalm = NADR $B$H$7$F!"(B $B%"%i!<%`%O%s%I%i$NDj5A2r=|$r9T$&5!G=$O$J$$!#(B $B$=$NB>$K$D$$$F$O!"(Bdef_alm $B$HF1$8$G$"$k!#(B

4.11 $B%G%P%C%0%5%]!<%H5!G=(B

vset_reg
$B%?%9%/$N%l%8%9%?FbMF@_Dj(B($B5!G=%3!<%I(B: -225)
    vset_reg: Set Task Registers
$B!Z%Q%i%a!<%?![(B
    ID          tskid       $B%?%9%/(BID
    T_REGS*     pk_regs     $BHFMQ%l%8%9%?$NCM$rF~$l$k%Q%1%C%H(B
    T_EIT*      pk_eit      PC $B$H(B PSW $B$NCM$rF~$l$k%Q%1%C%H(B
    T_CREGS*    pk_cregs    $B@)8f%l%8%9%?$NCM$rF~$l$k%Q%1%C%H(B
$B!Z%j%?!<%s%Q%i%a!<%?![(B
ER      ercd        $B%(%i!<%3!<%I(B
$B!Z(BC$B8@8l%$%s%?%U%'!<%9![(B
ER ercd = vset_reg(ID tskid, T_REGS *pk_regs, T_EIT *pk_eit,
                             T_CREGS *pk_cregs);
$B!Z2r@b![(B
6.13 vget_reg()/vset_reg()$B$r;2>H$N$3$H!#(B
$B!Z%(%i!<%3!<%I(B(ercd)$B![(B
E_OK $B@5>o=*N;(B
E_ID $BIT@5(BID$BHV9f(B (tskid$B$,IT@5$"$k$$$OMxMQ$G$-$J$$(B)
E_NOEXS $B%*%V%8%'%/%H$,B8:_$7$F$$$J$$(B(tskid $B$N%?%9%/$,B8:_$7$J$$(B)
E_OACV $B%*%V%8%'%/%H%"%/%;%98"0cH?(B
E_OBJ $B%*%V%8%'%/%H$N>uBV$,IT@5(B ($BBP>]%?%9%/$,<+%?%9%/(B)
E_PAR $B%Q%i%a!<%?%(%i!<(B(psw $B$,IT@5(B)
E_CTX $B%3%s%F%-%9%H%(%i!<(B($B%?%9%/FHN)It$+$i$NH/9T(B)
vget_reg
$B%?%9%/$N%l%8%9%?FbMF;2>H(B($B5!G=%3!<%I(B: -226)
    vget_reg: Get Task Registers
$B!Z%Q%i%a!<%?![(B
    ID          tskid       $B%?%9%/(BID
    T_REGS*     pk_regs     $BHFMQ%l%8%9%?$NCM$rF~$l$k%Q%1%C%H(B
    T_EIT*      pk_eit      PC $B$H(B PSW $B$NCM$rF~$l$k%Q%1%C%H(B
    T_CREGS*    pk_cregs    $B@)8f%l%8%9%?$NCM$rF~$l$k%Q%1%C%H(B
$B!Z%j%?!<%s%Q%i%a!<%?![(B
ER      ercd        $B%(%i!<%3!<%I(B
$B!Z(BC$B8@8l%$%s%?%U%'!<%9![(B
ER ercd =vget_reg(T_REGS *pk_regs, T_EIT *pk_eit, T_CREGS *pk_cregs,
                            ID tskid);
$B!Z2r@b![(B
6.13 vget_reg()/vset_reg()$B$r;2>H$N$3$H!#(B
$B!Z%(%i!<%3!<%I(B(ercd)$B![(B
E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H<$&%?%9%/4VF14|!&DL?.5!G=$9$Y$F$K4XO"$9$k$3$H$K$J$k!#(B

ITRON $B;EMM$KM%@hEY7Q>5$r55!G=$r;}$C$?%;%^%U%)$r%5%]!<%H$7$F$$$k!#(B $B$3$l$rM%@hEY7Q>5%;%^%U%)$H8F$V!#(B $BM%@hEY7Q>5%;%^%U%)5!G=$N;EMM$r8!F$$7$F$$$/$H!"(B $BM}A[E*$@$,

I-right/V $B$G$O!"A0

$BM%@hEY7Q>5%;%^%U%)$K4X$9$k>\$7$$5DO@$K$D$$$F$O!"(B $B0J2<$N;29MJ88%$r;2>H$N$3$H!#(B

[1] L. Sha, R. Rajkumar, and J. P. Lehoczky, "Priority Inheritance Protocols: An Approach to Real-Time Synchronization," IEEE Trans. Computers, vol. 39, pp. 1175-1185, Sep. 1990.

[2] H. Takada and K. Sakamura, "Experimental Implementations of Priority Inheritance Semaphore on ITRON-specification Kernel", Proc. 11th TRON Project International Symposium, pp. 106-113, IEEE CS Press, Dec. 1994.

4.13.2 $B;EMM(B1 $B$K$*$1$kM%@hEY7Q>5%;%^%U%)5!G=$N;EMM(B

I-right/V $B$G$O!"0J2<$K=R$Y$k;EMM(B1 $B$N;EMM$rMQ$$$F$$$k!#(B

$B;EMM(B1 $B$K$*$1$kM%@hEY7Q>5%;%^%U%)5!G=$G$O!"(B chg_pri $B$r;H$o$J$$>l9g$N%?%9%/$NM%@hEY$O!"(B $B$=$N%?%9%/$N=i4|M%@hEY$H!"(B $B$=$N%?%9%/$,3MF@$7$F$$$kM%@hEY7Q>5%;%^%U%)$rBT$C$F$$$kCf$G(B $B:G9bM%@hEY$N%?%9%/$NM%@hEY$H$N!"(B $B9b$$(B ( $BCM$,>.$5$$(B ) $BJ}$K@_Dj$5$l$k!#(B $B$=$N$?$a$K(B OS $B$O!"(B $B%?%9%/$,3MF@$7$F$$$kM%@hEY7Q>5%;%^%U%)$N%j%9%H$r4IM}$7$F$$$k!#(B

$BM%@hEY7Q>5%;%^%U%)$r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vcre_pis
$BM%@hEY7Q>5%;%^%U%)@8@.(B($B5!G=%3!<%I(B: -257)
    vcre_pis: Create Priority Inheritance Semaphore
$B!Z%Q%i%a!<%?![(B
    ID      pisid       $BM%@hEY7Q>5%;%^%U%)(BID
    T_CPIS* pk_cpis     $BM%@hEY7Q>5%;%^%U%)@8@.>pJs(B
$B!Z%j%?!<%s%Q%i%a!<%?![(B
ER        ercd        $B%(%i!<%3!<%I(B
$B!Z(BC$B8@8l%$%s%?%U%'!<%9![(B
ER ercd =vcre_pis(ID pisid, T_CPIS *pk_cpis);
$B!Z2r@b![(B

vcre_pis$B$G$O!"(Bpisid$B$G;XDj$5$l$?(B ID $BHV9f$r;}$DM%@hEY7Q>5%;%^%U%)$r@8@.$9$k!#(B $B6qBNE*$K$O!"@8@.$9$k%;%^%U%)$KBP$7$F4IM}%V%m%C%/$r3d$jIU$1!"(B $B%;%^%U%)$N=i4|CM$r(B 1 $B$K=i4|2=$9$k!#(B

ID$BHV9f$N@5Ii$N07$$$d;HMQ$G$-$J$$HO0O!"(B $B$=$l$i$N>l9g$N%(%i!<%3!<%I!"3HD%>pJs(B (exinf) $B$N07$$$K$D$$$F$O!"B>$NF14|!&DL?.%*%V%8%'%/%H$HF1MM$G$"$k!#(B

pisatr $B$O!"2<0LB&$,%7%9%F%`B0@-$rI=$7!"(B $B>e0LB&$,%$%s%W%j%a%s%H0MB8B0@-$rI=$9!#(B pisatr $B$N%7%9%F%`B0@-$NItJ,$G$O!"(B $B

    sematr := TA_TPRI

        TA_TPRI $BBT$A%?%9%/$N%-%e!<%$%s%0$OM%@hEY=g(B

$BM%@hEY7Q>5%;%^%U%)$G$O!"(B $BBT$A%?%9%/$N%-%e!<%$%s%0$OM%@hEY=g$G$J$$$H0UL#$,$J$$$?$a!"(B FIFO $B%-%e!<%$%s%0$OMQ0U$7$F$$$J$$!#(B $B$=$N$?$a!"(BTA_TPRI $B$r;XDj$7$J$/$F$b(B $BM%@hEY=g$N%-%e!<%$%s%0$K$J$k$,!"(B $BB>$NF14|!&DL?.%*%V%8%'%/%H$H$NE}0l@-$N$?$a$K!"(B TA_TPRI $B$r;XDj$7$F$b$h$$$3$H$K$7$F$$$k!#(B

$B!Z%(%i!<%3!<%I(B(ercd)$B![(B
E_OK $B@5>o=*N;(B
E_ID $BIT@5(BID$BHV9f(B(pisid$B$,IT@5$"$k$$$OMxMQ$G$-$J$$(B)
E_RSATR $BM=LsB0@-(B(pisatr$B$,IT@5$"$k$$$OMxMQ$G$-$J$$(B)
E_OBJ $B%*%V%8%'%/%H$N>uBV$,IT@5(B ($BF10l(BID$BHV9f$NM%@hEY7Q>5%;%^%U%)$,4{$KB8:_(B)
E_OACV $B%*%V%8%'%/%H%"%/%;%98"0cH?(B ($B%7%9%F%`%*%V%8%'%/%H$r%"%/%;%9$9$k8"Mx$r(B $B;}$?$J$$4D6-$+$i$NH/9T$G(B pisid < (-4))
vvcre_pis
$BM%@hEY7Q>5%;%^%U%)@8@.(B (ID$B<+F03dEv(B)($B5!G=%3!<%I(B: -259)
    vvcre_pis: Create Priority Inheritance Semaphore (automatic ID assignment)
$B!Z%Q%i%a!<%?![(B
T_CPIS*   pk_cpis     $BM%@hEY7Q>5%;%^%U%)@8@.>pJs(B
$B!Z%j%?!<%s%Q%i%a!<%?![(B
ER      ercd        $B@8@.$7$?M%@hEY7Q>5%;%^%U%)$N(BID, $B%(%i!<%3!<%I(B
$B!Z(BC$B8@8l%$%s%?%U%'!<%9![(B
ER ercd =vvcre_pis(T_CPIS *pk_cpis);
$B!Z2r@b![(B

ID $BHV9f$r;XDj$;$:$KM%@hEY7Q>5%;%^%U%)$r@8@.$7!"(B $B@8@.$7$?M%@hEY7Q>5%;%^%U%)$N(B ID ($BI,$:@5$NCM(B) $B$r(B ercd$B$KJV$9!#(Bercd$B$,Ii$N>l9g$O!"(B $B%(%i!<%3!<%I$rI=$9!#(B $B3d$jEv$F2DG=$J(B ID $B$,$J$$>l9g!"(BEV_FULL $B%(%i!<$H$J$k!#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B ($B%?%9%/FHN)It$+$i$NH/9T(B)
E_OBJ $B%*%V%8%'%/%H$N>uBV$,IT@5(B (pisid $B$NM%@hEY7Q>5%;%^%U%)$,3MF@$5$l$F$$$J$$!#(B $B$^$?$O!"B>$N%?%9%/$,3MF@$7$F$$$k(B)
vwai_pis
$BM%@hEY7Q>5%;%^%U%);q8;3MF@(B($B5!G=%3!<%I(B: -261)
vpreq_pis
$BM%@hEY7Q>5%;%^%U%);q8;3MF@(B ($B%]!<%j%s%0(B)($B5!G=%3!<%I(B: -262)
vtwai_pis
$BM%@hEY7Q>5%;%^%U%);q8;3MF@(B ($B%?%$%`%"%&%HM-(B)($B5!G=%3!<%I(B: -263)
    vwai_pis: Wait on Priority Inheritance Semaphore
   vpreq_pis: Poll and Request Priority Inheritance Semaphore
   vtwai_pis: Wait on Priority Inheritance Semaphore with Timeout
$B!Z%Q%i%a!<%?(B (vwai_pis, vpreq_pis $B$N>l9g(B) $B![(B
ID      pisid       $BM%@hEY7Q>5%;%^%U%)(BID
$B!Z%Q%i%a!<%?(B (vtwai_pis $B$N>l9g(B) $B![(B
    ID      pisid       $BM%@hEY7Q>5%;%^%U%)(BID
    TMO     tmout       $B%?%$%`%"%&%H;XDj(B
$B!Z%j%?!<%s%Q%i%a!<%?![(B
ER      ercd        $B%(%i!<%3!<%I(B
$B!Z(BC$B8@8l%$%s%?%U%'!<%9![(B
    ER ercd = vwai_pis(ID pisid);
    ER ercd =vpreq_pis(ID pisid);
    ER ercd =vtwai_pis(ID pisid, TMO tmout);
$B!Z2r@b![(B

vwai_pis $B$G$O!"(Bpisid $B$G<($5$l$?M%@hEY7Q>5%;%^%U%)$+$i!"(B $B;q8;$r3MF@$9$kA`:n$r9T$&!#(B $B6qBNE*$K$O!"BP>]M%@hEY7Q>5%;%^%U%)$,3MF@$5$l$F$$$J$$>l9g$K$O!"(B $BM%@hEY7Q>5%;%^%U%)$N3MF@[email protected]$9$k!#(B $B$3$N>l9g!"K\%7%9%F%`%3!<%k$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%i%a!<%?![(B
    ID      pisid       $BM%@hEY7Q>5%;%^%U%)(BID
    T_RPIS* pk_rpis     $BM%@hEY7Q>5%;%^%U%)>uBV$rJV$9%Q%1%C%H%"%I%l%9(B
$B!Z%j%?!<%s%Q%i%a!<%?![(B
ER      ercd        $B%(%i!<%3!<%I(B

  pk_rpis $B$NFbMF(B
    VP      exinf       $B3HD%>pJs(B
    BOOL_ID wtsk        $BBT$A%?%9%/$NM-L5(B
    BOOL_ID pistsk      $B3MF@%?%9%/$NM-L5(B
$B!Z(BC$B8@8l%$%s%?%U%'!<%9![(B
ER ercd =vref_pis(T_RPIS *pk_rpis, ID pisid);
$B!Z2r@b![(B

pisid $B$G<($5$l$?M%@hEY7Q>5%;%^%U%)$N3FuBV$r;2>H$7!"(B $B%j%?!<%s%Q%i%a!<%?$H$7$FBT$A%?%9%/$NM-L5(B (wtsk)$B!"(B $B3MF@%?%9%/$NM-L5(B (pistsk)$B!"(B $B3HD%>pJs(B(exinf)$B$rJV$9!#(B

wtsk$B$O!"(B $B$3$NM%@hEY7Q>5%;%^%U%)$GBT$C$F$$$k%?%9%/$NM-L5$r<($9!#(B $BBT$A%?%9%/$,L5$$>l9g$O(B wtsk = FALSE = 0 $B$H$J$k!#(B $BBT$A%?%9%/$,$"$k>l9g!"(Bwtsk$B$K$OBT$A9TNs$N@hF,$N%?%9%/$N(B ID $B$rJV$9!#(B

pistsk$B$O!"(B $B$3$NM%@hEY7Q>5%;%^%U%)$r3MF@$7$F$$$k%?%9%/$NM-L5$r<($9!#(B $B3MF@%?%9%/$,L5$$>l9g$O(B pistsk = FALSE = 0$B$H$J$k!#(B $B3MF@%?%9%/$,$"$k>l9g!"(Bpistsk $B$K$O3MF@%?%9%/$N(B ID $B$rJV$9!#(B

vref_pis $B$GBP>]M%@hEY7Q>5%;%^%U%)$,B8:_$7$J$$>l9g$K$O!"(B E_NOEXS$B%(%i!<$H$J$k!#(B

$B$I$s$J>l9g$G$b!"(Bwtsk = FALSE $B$H(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inheritance Semaphore (automatic ID assignment)
$B!Z%Q%i%a!<%?![(B
T_CPIS*   pk_cpis     $BM%@hEY7Q>5%;%^%U%)@8@.>pJs(B
$B!Z%j%?!<%s%Q%i%a!<%?![(B
ER      ercd        $B@8@.$7$?M%@hEY7Q>5%;%^%U%)$N(BID, $B%(%i!<%3!<%I(B
$B!Z(BC$B8@8l%$%s%?%U%'!<%9![(B
ER ercd =vvcre_pis(T_CPIS *pk_cpis);
$B!Z2r@b![(B

ID $BHV9f$r;XDj$;$:$KM%@hEY7Q>5%;%^%U%)$r@8@.$7!"(B $B@8@.$7$?M%@hEY7Q>5%;%^%U%)$N(B ID ( $BI,$:@5$NCM(B ) $B$r(B ercd$B$KJV$9!#(Bercd$B$,Ii$N>l9g$O!"(B $B%(%i!<%3!<%I$rI=$9!#(B $B3d$jEv$F2DG=$J(B ID $B$,$J$$>l9g!"(BEV_FULL$B%(%i!<$H$J$k!#(B $B$=$NB>$K$D$$$F$O!"(Bvcre_pis $B$HF1$8$G$"$k!#(B

vdel_pis
$BM%@hEY7Q>5%;%^%U%):o=|(B($B5!G=%3!<%I(B: -258)
    vdel_pis: Delete Priority Inheritance Semaphore
$B!Z%Q%i%a!<%?![(B
ID      pisid       $BM%@hEY7Q>5%;%^%U%)(BID
$B!Z%j%?!<%s%Q%i%a!<%?![(B
ER      ercd        $B%(%i!<%3!<%I(B
$B!Z(BC$B8@8l%$%s%?%U%'!<%9![(B
ER ercd =vdel_pis(ID pisid);
$B!Z2r@b![(B

pisid $B$G<($5$l$?M%@hEY7Q>5%;%^%U%)$r:o=|$9$k!#(B

$BK\%7%9%F%`%3!<%k$NH/9T$K$h$j!"(B $BBP>]M%@hEY7Q>5%;%^%U%)$N4IM}%V%m%C%/MQ$NNN0h$O2rJ|$5$l$k!#(B $B$^$?!"$3$N%7%9%F%`%3!<%k$,=*N;$7$?8e$O!"(B $BF1$8(B ID $BHV9f$NM%@hEY7Q>5%;%^%U%)$r:F$S@8@.$9$k$3$H$,$G$-$k!#(B

$BBP>]M%@hEY7Q>5%;%^%U%)$K$*$$$F>[email protected])$rBT$C$F$$$k(B $B%?%9%/$,$"$C$?>l9g$K$b!"(B $BK\%7%9%F%`%3!<%k$O@5>o=*N;$9$k$,!"(B $BBT$A>uBV$K$"$C$?%?%9%/$K$O%(%i!<(B E_DLT $B$,JV$5$l$k!#(B

$B!Z%(%i!<%3!<%I(B(ercd)$B![(B
E_OK $B@5>o=*N;(B
E_ID $BIT@5(BID$BHV9f(B(pisid $B$,IT@5$"$k$$$OMxMQ$G$-$J$$(B)
E_NOEXS $B%*%V%8%'%/%H$,B8:_$7$F$$$J$$(B (pisid$B$NM%@hEY7Q>5%;%^%U%)$,B8:_$7$F$$$J$$(B)
E_OACV $B%*%V%8%'%/%H%"%/%;%98"0cH?(B ($B%7%9%F%`%*%V%8%'%/%H$r%"%/%;%9$9$k8"Mx$r(B $B;}$?$J$$4D6-$+$i$NH/9T$G(B pisid < (-4))
vsig_pis
$BM%@hEY7Q>5%;%^%U%);q8;JV5Q(B($B5!G=%3!<%I(B: -264)
    vsig_pis: Signal Priority Inheritance Semaphore
$B!Z%Q%i%a!<%?![(B
ID      pisid       $BM%@hEY7Q>5%;%^%U%)(BID
$B!Z%j%?!<%s%Q%i%a!<%?![(B
ER      ercd        $B%(%i!<%3!<%I(B
$B!Z(BC$B8@8l%$%s%?%U%'!<%9![(B
ER ercd =vsig_pis(ID pisid);
$B!Z2r@b![(B

pisid $B$G<($5$l$?M%@hEY7Q>5%;%^%U%)$KBP$7$F!"(B $B;q8;$r2rJ|$9$kA`:n$r9T$&!#(B

$B6qBNE*$K$O!"(B $BBP>]M%@hEY7Q>5%;%^%U%)$KBP$7$F4{$KBT$C$F$$$k%?%9%/$,$"$l$P!"(B $BBT$A9TNs$N@hF,$N%?%9%/$r(B READY $B>uBV$K0\$9!#(B $B$3$N>l9g!"$=$NM%@hEY7Q>5%;%^%U%)$O3MF@$5$l$?>uBV$N$^$^$G$"$k!#(B $B0lJ}!"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$$$k(B)
vwai_pis
$BM%@hEY7Q>5%;%^%U%);q8;3MF@(B($B5!G=%3!<%I(B: -261)
vpreq_pis
$BM%@hEY7Q>5%;%^%U%);q8;3MF@(B ($B%]!<%j%s%0(B)($B5!G=%3!<%I(B: -262)
vtwai_pis
$BM%@hEY7Q>5%;%^%U%);q8;3MF@(B ($B%?%$%`%"%&%HM-(B)($B5!G=%3!<%I(B: -263)
    vwai_pis: Wait on Priority Inheritance Semaphore
   vpreq_pis: Poll and Request Priority Inheritance Semaphore
   vtwai_pis: Wait on Priority Inheritance Semaphore with Timeout
$B!Z%Q%i%a!<%?(B (vwai_pis, vpreq_pis $B$N>l9g(B) $B![(B
ID      pisid       $BM%@hEY7Q>5%;%^%U%)(BID
$B!Z%Q%i%a!<%?(B (vtwai_pis $B$N>l9g(B) $B![(B
    ID      pisid       $BM%@hEY7Q>5%;%^%U%)(BID
    TMO     tmout       $B%?%$%`%"%&%H;XDj(B
$B!Z%j%?!<%s%Q%i%a!<%?![(B
ER      ercd        $B%(%i!<%3!<%I(B
$B!Z(BC$B8@8l%$%s%?%U%'!<%9![(B
    ER ercd = vwai_pis(ID pisid);
    ER ercd =vpreq_pis(ID pisid);
    ER ercd =vtwai_pis(ID pisid, TMO tmout);
$B!Z2r@b![(B

vwai_pis $B$G$O!"(Bpisid $B$G<($5$l$?M%@hEY7Q>5%;%^%U%)$+$i!"(B $B;q8;$r3MF@$9$kA`:n$r9T$&!#(B $B6qBNE*$K$O!"BP>]M%@hEY7Q>5%;%^%U%)$,3MF@$5$l$F$$$J$$>l9g$K$O!"(B $BM%@hEY7Q>5%;%^%U%)$N3MF@[email protected]$9$k!#(B $B$3$N>l9g!"K\%7%9%F%`%3!<%k$NH/9T%?%9%/$OBT$A>uBV$KF~$i$:!"]M%@hEY7Q>5%;%^%U%)$,3MF@$5$l$F$$$k>l9g$K$O!"(B $BK\%7%9%F%`%3!<%k$rH/9T$7$?%?%9%/$OBT$A>uBV$KF~$k(B $B$9$J$o$A!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Dj$5$l!"$=$N7k2L!"(B $BBT$A2r=|$5$l$?%?%9%/$Nl9g$,$"$k!#(B

$B!Z%(%i!<%3!<%I(B(ercd)$B![(B
E_OK $B@5>o=*N;(B
E_ID $BIT@5(BID$BHV9f(B(pisid $B$,IT@5$"$k$$$OMxMQ$G$-$J$$(B)
E_NOEXS $B%*%V%8%'%/%H$,B8:_$7$F$$$J$$(B (pisid$B$NM%@hEY7Q>5%;%^%U%)$,B8:_$7$F$$$J$$(B)
E_OACV $B%*%V%8%'%/%H%"%/%;%98"0cH?(B ($B%7%9%F%`%*%V%8%'%/%H$r%"%/%;%9$9$k8"Mx$r(B $B;}$?$J$$4D6-$+$i$NH/9T$G(B pisid < (-4))
E_PAR $B%Q%i%a!<%?%(%i!<(B (tmout <= (-2))
E_DLT $BBT$A%*%V%8%'%/%H$,:o=|$5$l$?(B ($BBT$A$N4V$KBP>]M%@hEY7Q>5%;%^%U%)$,:o=|(B)
E_RLWAI $BBT$A>uBV6/@)2r=|(B ($BBT$A$N4V$K(B rel_wai $B$r
E_TMOUT $B%]!<%j%s%0<:GT$^$?$O%?%$%`%"%&%H(B
E_CTX $B%3%s%F%-%9%H%(%i!<(B ($B%?%9%/FHN)It$^$?$O%G%#%9%Q%C%A6X;_>uBV$G
vref_pis
$BM%@hEY7Q>5%;%^%U%)>uBV;2>H(B($B5!G=%3!<%I(B: -260)
    vref_pis: Refer Priority Inheritance Semaphore Status
$B!Z%Q%i%a!<%?![(B
    ID      pisid       $BM%@hEY7Q>5%;%^%U%)(BID
    T_RPIS* pk_rpis     $BM%@hEY7Q>5%;%^%U%)>uBV$rJV$9%Q%1%C%H%"%I%l%9(B
$B!Z%j%?!<%s%Q%i%a!<%?![(B
ER      ercd        $B%(%i!<%3!<%I(B

  pk_rpis $B$NFbMF(B
    VP      exinf       $B3HD%>pJs(B
    BOOL_ID wtsk        $BBT$A%?%9%/$NM-L5(B
    BOOL_ID pistsk      $B3MF@%?%9%/$NM-L5(B
$B!Z(BC$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