$B$3$N>O$NL\
$BA0JG(B:1.2 $B%a%C%;!<%84IM}$K$b$I$k(B
$B4IM}$K$9$9$`(B

1.3 $B%W%m%;%9(B/$B%?%9%/4VF14|DL?.4IM}(B

$B%W%m%;%9(B / $B%?%9%/4V$NF14|$dDL?.$r9T$&$?$a$N5!9=$H$7$F!"(B $B2<5-$NF14|DL?.5!G=$rDs6!$9$k!#(B

$B$3$l$i$NF14|!&DL?.%*%V%8%'%/%H$OF0E*$K@8@.$5$l!"(B $B@8@.;~$K3d$jEv$F$i$l$?(BID ( > 0 ) $B$K$h$j<1JL$5$l$k!#(B

$B%a%C%;!<%8$K$h$kDL?.$H0lHVBg$-$/0[$J$kE@$O!"(B $B%a%C%;!<%8$,%W%m%;%94V$NDL?.$G$"$k$N$KBP$7!"(B $B%?%9%/4V$NDL?.$G$"$k$3$H$G$"$k!#(B $B$7$?$,$C$F!"

1.3.1 $B%G!<%?(B / $BDj?t$NDj5A(B

$B""(B $B%?%$%`%"%&%HDj5A(B

typedef W   TMOUT;          /* $B%?%$%`%"%&%H;XDj(B ($B%_%jIC(B) */
#define T_NOWAIT    ( 0)    /* $BBT$?$J$$(B */
#define T_FOREVER   (-1)    /* $B1J5WBT$A(B */

$B""(B $B%;%^%U%)Dj?tDj5A(B

#define SEM_SYNC    0x0000  /* $BF14|MQ%;%^%U%)(B */
#define SEM_EXCL    0x4000  /* $BGSB>@)8fMQ%;%^%U%)(B */

$B""(B $B%$%Y%s%H%U%i%0Dj?tDj5A(B

#define WF_AND      0x0000  /* $B%$%Y%s%H%U%i%0(B AND $BBT$A(B */
#define WF_OR       0x0002  /* $B%$%Y%s%H%U%i%0(B OR  $BBT$A(B */

1.3.2 $B%7%9%F%`%3!<%k(B

cre_sem
 
$B%;%^%U%)$N@8@.(B

$B!Z7A<0![(B

WERR    cre_sem(W cnt, UW opt)

$B!Z%Q%i%a!<%?![(B

W   cnt $B%;%^%U%)=i4|CM(B
        $BF14|MQ%;%^%U%)$N>l9g$K$O(B cnt $B!f(B 0 $B$G$J$1$l$P$J$i$J$$!#(B
        $BGSB>@)8fMQ%;%^%U%)$N>l9g$K$O(B cnt = 1 $B$G$J$1$l$P$J$i$J$$!#(B

UW  opt $B%;%^%U%)B0@-(B
        ( SEM_SYNC $B!B(B SEM_EXCL ) | [ DELEXIT ]
        SEM_SYNC    $BF14|MQ%;%^%U%)(B
        SEM_EXCL    $BGSB>@)8fMQ%;%^%U%)(B
        DELEXIT     $B@8@.%W%m%;%9=*N;;~$K<+F0:o=|(B

$B!Z%j%?!<%sCM![(B

$B!d(B0   $B@5>o(B($B@8@.$7$?%;%^%U%)(BID)
$B!c(B0   $B%(%i!<(B($B%(%i!<%3!<%I(B)

$B!Z2r@b![(B

$B%;%^%U%)$r@8@.$9$k!#(B $B@8@.$7$?%;%^%U%)$O!"$9$Y$F$N%W%m%;%9$+$i;HMQ2DG=$G$"$k!#(B

SEM_EXCL -- $BGSB>@)8fMQ%;%^%U%)(B
SEM_SYNC -- $BF14|MQ%;%^%U%)(B

$B!Z%(%i!<%3!<%I![(B

ER_NOSPC    : $B%7%9%F%`$N%a%b%jNN0h$,ITB-$7$?!#(B
ER_LIMIT    : $B%;%^%U%)$N?t$,%7%9%F%`$N@)8B$rD6$($?!#(B
ER_PAR      : $B%Q%i%a!<%?$,IT@5$G$"$k!#(B
del_sem
 
$B%;%^%U%)$N:o=|(B

$B!Z7A<0![(B

ERR del_sem(ID id)

$B!Z%Q%i%a!<%?![(B

ID  id  $B%;%^%U%)(BID

$B!Z%j%?!<%sCM![(B

$B!a(B0  $B@5>o(B
$B!c(B0  $B%(%i!<(B($B%(%i!<%3!<%I(B)

$B!Z2r@b![(B

$B%;%^%U%)$r:o=|$9$k!#(B
$B:o=|$7$?%;%^%U%)$GBT$A>uBV$K$"$C$?%?%9%/$OBT$A$,2r=|$5$l!"(B $B$=$N%?%9%/$X(B ER_DLT $B$,JV$5$l$k!#(B

$B!Z%(%i!<%3!<%I![(B

ER_ID       : $B%;%^%U%)(BID$B$,IT@5$G$"$k!#(B
ER_NOEXS    : $B%;%^%U%)$OB8:_$7$F$$$J$$!#(B
sig_sem
 
$B%;%^%U%)$X;q8;$NJV5Q(B

$B!Z7A<0![(B

ERR sig_sem(ID id)

$B!Z%Q%i%a!<%?![(B

ID  id  $B%;%^%U%)(BID

$B!Z%j%?!<%sCM![(B

$B!a(B0  $B@5>o(B
$B!c(B0  $B%(%i!<(B($B%(%i!<%3!<%I(B)

$B!Z2r@b![(B

$B%;%^%U%)$X;q8;$r(B 1 $B$DJV5Q$9$k!#(B

$B%;%^%U%)$N;q8;BT$A$N%?%9%/$,$"$l$P!"(B $BBT$A9TNs$N@hF,$N%?%9%/$NBT$A$r2r=|$9$k!#(B $B;q8;BT$A$N%?%9%/$,$J$1$l$P!"%;%^%U%)$N;q8;$r(B 1 $BA}$d$9!#(B

$BGSB>@)8fMQ%;%^%U%)$N>l9g$K$O!"(B $BBP>]%;%^%U%)$N;q8;$r3MF@$7$F$$$J$$>uBV$GJV5Q$7$h$&$H$7$?>l9g$O(B ER_OBJ $B$K$J$k!#(B

$B!Z%(%i!<%3!<%I![(B

ER_ID       : $B%;%^%U%)(BID$B$,IT@5$G$"$k!#(B
ER_LIMIT    : $B%;%^%U%)$N%+%&%s%HCM$,@)8B$r1[$($?!#(B
ER_NOEXS    : $B%;%^%U%)$OB8:_$7$F$$$J$$!#(B
ER_OBJ      : $BGSB>@)8fMQ%;%^%U%)$KBP$7$F$NIT@5A`:n$G$"$k!#(B
wai_sem
 
$B%;%^%U%)$+$i;q8;$N3MF@(B

$B!Z7A<0![(B

ERR wai_sem(ID id, TMOUT tmo)

$B!Z%Q%i%a!<%?![(B

ID      id      $B%;%^%U%)(BID

TMOUT   tmo         $B%?%$%`%"%&%H;XDj(B ($B%_%jIC(B)
        T_NOWAIT    $B;q8;$r3MF@$G$-$J$/$F$bBT$?$J$$(B
        T_FOREVER   $B;q8;$r3MF@$G$-$k$^$GBT$D(B
        >0          $B;q8;$r3MF@$G$-$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!c(B0  $B%(%i!<(B($B%(%i!<%3!<%I(B)

$B!Z2r@b![(B

$B%$%Y%s%H%U%i%0$N8=:_$NCM$K(B ptn $B$,(B OR ($BO@M}OB(B)$B$5$l$k!#(B
$B$=$N7k2L!"BT$A>uBV$K$"$k%?%9%/$NBT$A2r=|>r7o$,K~$?$5$l$l$P!"(B $B$=$N%?%9%/$NBT$A$,2r=|$5$l$k!#(B

$B!Z%(%i!<%3!<%I![(B

ER_ID       : $B%$%Y%s%H%U%i%0(BID$B$,IT@5$G$"$k!#(B
ER_NOEXS    : $B%$%Y%s%H%U%i%0$OB8:_$7$F$$$J$$!#(B
ER_PAR      : $B%Q%i%a!<%?$,IT@5$G$"$k!#(B
clr_flg
 
$B%$%Y%s%H%U%i%0$r%/%j%"(B

$B!Z7A<0![(B

ERR clr_flg(ID id, W ptn)

$B!Z%Q%i%a!<%?![(B

ID      id     $B%$%Y%s%H%U%i%0(BID
W       ptn    $B%$%Y%s%H%U%i%0>C5n%Q%?!<%s(B

$B!Z%j%?!<%sCM![(B

$B!a(B0   $B@5>o(B
$B!c(B0   $B%(%i!<(B($B%(%i!<%3!<%I(B)

$B!Z2r@b![(B

$B%$%Y%s%H%U%i%0$N8=:_$NCM$K(B ptn $B$,(B AND ($BO@M}@Q(B)$B$5$l$k!#(B
$B%$%Y%s%H%U%i%0$N%/%j%"$G!"%?%9%/$NBT$A$,2r=|$5$l$k$3$H$O$J$$!#(B

$B!Z%(%i!<%3!<%I![(B

ER_ID       : $B%$%Y%s%H%U%i%0(BID$B$,IT@5$G$"$k!#(B
ER_NOEXS    : $B%$%Y%s%H%U%i%0$OB8:_$7$F$$$J$$!#(B
wai_flg
 
$B%$%Y%s%H%U%i%0BT$A(B

$B!Z7A<0![(B

WERR    wai_flg(ID id, W ptn, UW mode, TMOUT tmo)

$B!Z%Q%i%a!<%?![(B

ID  id  $B%$%Y%s%H%U%i%0(BID

W   ptn $BBT$A%Q%?!<%s(B (>0)

UW  mode    $BBT$A2r=|>r7o(B
        ( WF_AND $B!B(B WF_OR ) | [ NOCLR ]
        WF_AND  0x0000  ptn $B$G(B1$B$N%S%C%H$,$9$Y$F%;%C%H$5$l$k$^$GBT$D(B
        WF_OR   0x0002  ptn $B$G(B1$B$N%S%C%H$N$$$:$l$+$,%;%C%H$5$l$k$^$GBT$D(B
        NOCLR   0x0008  $BBT$A2r=|>r7o$,K~$?$5$l$?;~!"%$%Y%s%H%U%i%0$NCM$r(B
                        $B%/%j%"$7$J$$(B

TMOUT   tmo $B%?%$%`%"%&%H;XDj(B ($B%_%jIC(B)
        T_NOWAIT    $BBT$A2r=|>r7o$,K~$?$5$l$J$/$F$bBT$?$J$$(B
        T_FOREVER   $BBT$A2r=|>r7o$,K~$?$5$l$k$^$GBT$D(B
        >0          $BBT$A2r=|>r7o$,K~$?$5$l$k$^$G:GD9(B tmo $B%_%jICBT$D(B

$B!Z%j%?!<%sCM![(B

$B!d(B0   $B@5>o(B($BBT$A>uBV$,2r=|$5$l$?$H$-$N%$%Y%s%H%U%i%0$NCM(B)
$B!c(B0   $B%(%i!<(B($B%(%i!<%3!<%I(B)

$B!Z2r@b![(B

mode $B$G;XDj$5$l$?>r7o$K$7$?$,$C$F!"(B $B%$%Y%s%H%U%i%0$,%;%C%H$5$l$k$N$rBT$D!#(B

$Br7o$,K~$?$5$l$?$H$-BT$A2r=|$H$J$k!#(B

WF_AND $B$N;~(B ( flg & ptn ) == ptn
WF_OR $B$N;~(B  ( flg & ptn ) != 0
        $B"h(B flg $B$O%$%Y%s%H%U%i%0$NCM(B

NOCLR $B$,;XDj$5$l$?;~$K$O!"(B $BBT$A2r=|>r7o$,K~$?$5$l$?$H$-%$%Y%s%H%U%i%0$NCM$OJQ2=$7$J$$!#(B NOCLR $B$N;XDj$,$J$$>l9g$K$O!"(B $BBT$A2r=|>r7o$,K~$?$5$l$?$H$-%$%Y%s%H%U%i%0$NCM(B ( $BA4%S%C%H(B ) $B$,(B 0 $B%/%j%"$5$l$k!#(B

$B;XDj$5$l$?BT$A;~4V$,7P2a$7$F$bBT$A2r=|>r7o$,K~$?$5$l$J$$>l9g$K$O!"(B ER_NONE $B$,JV$5$l$k!#(B

$B!Z%(%i!<%3!<%I![(B

ER_DLT      : $B%$%Y%s%H%U%i%0$,BT$A$N4V$K:o=|$5$l$?!#(B
ER_ID       : $B%$%Y%s%H%U%i%0(BID$B$,IT@5$G$"$k!#(B
ER_MINTR    : $B%a%C%;!<%8%O%s%I%i$,5/F0$5$l$?$?$aBT$A=hM}$,CfCG$5$l$?!#(B
ER_NOEXS    : $B%$%Y%s%H%U%i%0$OB8:_$7$F$$$J$$!#(B
ER_NONE     : $B%$%Y%s%H%U%i%0$N>r7o$,K~$?$5$l$:$K%?%$%`%"%&%H$7$?!#(B
ER_PAR      : $B%Q%i%a!<%?$,IT@5$G$"$k!#(B
cre_mbf
 
$B%a%C%;!<%8%P%C%U%!$N@8@.(B

$B!Z7A<0![(B

WERR    cre_mbf(W bufsz, W max, UW opt)

$B!Z%Q%i%a!<%?![(B

W       bufsz   $B%a%C%;!<%8%P%C%U%!$NA4BN$N%5%$%:(B ($B%P%$%H?t(B)
W       max     $B%a%C%;!<%8(B1$B$DEv$?$j$N:GBg%5%$%:(B ($B%P%$%H?t(B)
UW      opt     $B%a%C%;!<%8%P%C%U%!B0@-(B
        [ DELEXIT ]
        DELEXIT     $B@8@.%W%m%;%9=*N;;~$K<+F0:o=|(B

$B!Z%j%?!<%sCM![(B

$B!d(B0   $B@5>o(B($B%a%C%;!<%8%P%C%U%!(BID)
$B!c(B0   $B%(%i!<(B($B%(%i!<%3!<%I(B)

$B!Z2r@b![(B

$B%a%C%;!<%8%P%C%U%!$r@8@.$9$k!#(B $B@8@.$7$?%a%C%;!<%8%P%C%U%!$O!"$9$Y$F$N%W%m%;%9$+$i;HMQ2DG=$G$"$k!#(B

bufsz / max $B8D$N%a%C%;!<%8$,%a%C%;!<%8%P%C%U%!$KF~$l$i$l$k(B ( $BJ]B8$G$-$k(B ) $B$3$H$OJ]>Z$5$l$J$$!#(B

bufsz $B$K(B 0 $B$r;XDj$9$k$3$H$,$G$-$k!#(B $B$3$N>l9g!"%a%C%;!<%8$O%a%C%;!<%8%P%C%U%!$KF~$i$:(B ( $BJ]B8$5$l$:(B )$B!"(B $BAw?.B&$N%?%9%/$H

$B!Z%(%i!<%3!<%I![(B

ER_NOSPC    : $B%7%9%F%`$N%a%b%jNN0h$,ITB-$7$?!#(B
ER_LIMIT    : $B%a%C%;!<%8%P%C%U%!$N?t$,%7%9%F%`$N@)8B$rD6$($?!#(B
ER_PAR      : $B%Q%i%a!<%?$,IT@5$G$"$k!#(B
del_mbf
 
$B%a%C%;!<%8%P%C%U%!$N:o=|(B

$B!Z7A<0![(B

ERR del_mbf(ID id)

$B!Z%Q%i%a!<%?![(B

ID  id  $B%a%C%;!<%8%P%C%U%!(BID

$B!Z%j%?!<%sCM![(B

$B!a(B0  $B@5>o(B
$B!c(B0  $B%(%i!<(B($B%(%i!<%3!<%I(B)

$B!Z2r@b![(B

$B%a%C%;!<%8%P%C%U%!$r:o=|$9$k!#(B
$B:o=|$7$?%a%C%;!<%8%P%C%U%!$GBT$A>uBV$K$"$C$?%?%9%/$OBT$A$,2r=|$5$l!"(B $B$=$N%?%9%/$X(B ER_DLT $B$,JV$5$l$k!#(B

$B!Z%(%i!<%3!<%I![(B

ER_ID       : $B%a%C%;!<%8%P%C%U%!(BID$B$,IT@5$G$"$k!#(B
ER_NOEXS    : $B%a%C%;!<%8%P%C%U%!$OB8:_$7$F$$$J$$!#(B
snd_mbf
 
$B%a%C%;!<%8%P%C%U%!$XAw?.(B

$B!Z7A<0![(B

ERR snd_mbf(ID id, VP msg, W sz, TMOUT tmo)

$B!Z%Q%i%a!<%?![(B

ID      id          $B%a%C%;!<%8%P%C%U%!(BID
VP      msg         $BAw?.%a%C%;!<%8(B
W       sz          $BAw?.%a%C%;!<%8%5%$%:(B ($B%P%$%H?t(B)
TMOOUT  tmo         $B%?%$%`%"%&%H;XDj(B ($B%_%jIC(B)
        T_NOWAIT    $BAw?.$G$-$J$/$F$bBT$?$J$$(B
        T_FOREVER   $BAw?.$G$-$k$^$GBT$D(B
        >0          $BAw?.$G$-$k$^$G:GD9(B tmo $B%_%jICBT$D(B

$B!Z%j%?!<%sCM![(B

$B!a(B0  $B@5>o(B
$B!c(B0  $B%(%i!<(B($B%(%i!<%3!<%I(B)

$B!Z2r@b![(B

$B%a%C%;!<%8%P%C%U%!$X%a%C%;!<%8$rAw?.$9$k!#(B $B%a%C%;!<%8%P%C%U%!$K6u$-$,B-$j$J$$>l9g$K$O!"(B $B6u$-$,$G$-$k$^$GBT$C$FAw?.$9$k!#(B $B;XDj$5$l$?BT$A;~4V$,7P2a$7$F$bAw?.$G$-$J$$>l9g$K$O!"(B ER_NONE $B$,JV$5$l$k!#(B

$B%a%C%;!<%8%P%C%U%!$N@8@.;~$K;XDj$7$?%a%C%;!<%8$N:GBg%5%$%:(B ( max ) $B$h$jBg$-$J%a%C%;!<%8$rAw?.$9$k$3$H$O$G$-$J$$!#(B

$B!Z%(%i!<%3!<%I![(B

ER_DLT      : $B%a%C%;!<%8%P%C%U%!$,BT$A$N4V$K:o=|$5$l$?!#(B
ER_ID       : $B%a%C%;!<%8%P%C%U%!(BID$B$,IT@5$G$"$k!#(B
ER_MINTR    : $B%a%C%;!<%8%O%s%I%i$,5/F0$5$l$?$?$aBT$A=hM}$,CfCG$5$l$?!#(B
ER_NOEXS    : $B%a%C%;!<%8%P%C%U%!$OB8:_$7$F$$$J$$!#(B
ER_NONE     : $B%a%C%;!<%8$rAw?.$G$-$:$K%?%$%`%"%&%H$7$?!#(B
ER_PAR      : $B%Q%i%a!<%?$,IT@5$G$"$k!#(B
rcv_mbf
 
$B%a%C%;!<%8%P%C%U%!$+$i

$B!Z7A<0![(B

WERR    rcv_mbf(ID id, VP msg, TMOUT tmo)

$B!Z%Q%i%a!<%?![(B

ID      id          $B%a%C%;!<%8%P%C%U%!(BID
VP      msg         $B

$B!Z%j%?!<%sCM![(B

$B!d(B0   $B@5>o(B($B

$B!Z2r@b![(B

$B%a%C%;!<%8%P%C%U%!$+$i%a%C%;!<%8$rmsg $B$NNN0h$K=q$-9~$`!#(B $B%a%C%;!<%8%P%C%U%!$K$"$k@hF,$N%a%C%;!<%8$,l9g$K$O!"(B $B%a%C%;!<%8$,Aw?.$5$l$k$^$GBT$C$Fl9g$K$O!"(B ER_NONE $B$,JV$5$l$k!#(B msg $B$K$O!"(B $B%a%C%;!<%8%P%C%U%!$N@8@.;~$K;XDj$7$?%a%C%;!<%8(B 1 $B$DEv$?$j$N:GBg%5%$%:(B ( max ) $B0J>e$NNN0h$,$J$/$F$O$$$1$J$$!#(B

$B!Z%(%i!<%3!<%I![(B

ER_DLT      : $B%a%C%;!<%8%P%C%U%!$,BT$A$N4V$K:o=|$5$l$?!#(B
ER_ID       : $B%a%C%;!<%8%P%C%U%!(BID$B$,IT@5$G$"$k!#(B
ER_MINTR    : $B%a%C%;!<%8%O%s%I%i$,5/F0$5$l$?$?$aBT$A=hM}$,CfCG$5$l$?!#(B
ER_NOEXS    : $B%a%C%;!<%8%P%C%U%!$OB8:_$7$F$$$J$$!#(B
ER_NONE     : $B%a%C%;!<%8$r

cre_por
 
$B%i%s%G%V%]!<%H$N@8@.(B

$B!Z7A<0![(B

WERR    cre_por(W maxcmsz, W maxrmsz, UW opt)

$B!Z%Q%i%a!<%?![(B

W   maxcmsz $B8F=P%a%C%;!<%8:GBg%5%$%:(B ($B%P%$%H?t(B)
W   maxrmsz $BJVEz%a%C%;!<%8:GBg%5%$%:(B ($B%P%$%H?t(B)
UW  opt     $B%i%s%G%V%]!<%HB0@-(B
            [ DELEXIT ]
            DELEXIT     $B@8@.%W%m%;%9=*N;;~$K<+F0:o=|(B

$B!Z%j%?!<%sCM![(B

$B!d(B0   $B@5>o(B($B%i%s%G%V%]!<%H(BID)
$B!c(B0   $B%(%i!<(B($B%(%i!<%3!<%I(B)

$B!Z2r@b![(B

$B%i%s%G%V%]!<%H$r@8@.$9$k!#(B $B@8@.$7$?%i%s%G%V%]!<%H$O!"$9$Y$F$N%W%m%;%9$+$i;HMQ2DG=$G$"$k!#(B

$B!Z%(%i!<%3!<%I![(B

ER_NOSPC    : $B%7%9%F%`$N%a%b%jNN0h$,ITB-$7$?!#(B
ER_LIMIT    : $B%i%s%G%V%]!<%H$N?t$,%7%9%F%`$N@)8B$rD6$($?!#(B
ER_PAR      : $B%Q%i%a!<%?$,IT@5$G$"$k!#(B
del_por
 
$B%i%s%G%V%]!<%H$N:o=|(B

$B!Z7A<0![(B

ERR del_por(ID id)

$B!Z%Q%i%a!<%?![(B

ID  id  $B%i%s%G%V%]!<%H(BID

$B!Z%j%?!<%sCM![(B

$B!a(B0   $B@5>o(B
$B!c(B0   $B%(%i!<(B($B%(%i!<%3!<%I(B)

$B!Z2r@b![(B

$B%i%s%G%V%]!<%H$r:o=|$9$k!#(B

$B:o=|$7$?%i%s%G%V%]!<%H$GuBV$K$"$C$?%?%9%/$OBT$A$,2r=|$5$l!"(B $B$=$N%?%9%/$X(B ER_DLT $B$,JV$5$l$k!#(B $B%i%s%G%[email protected])8e$K%i%s%G%V%]!<%H$,:o=|$5$l$F$b!"(B $B%i%s%G%[email protected])$7$?$^$^$G$"$j!"@5>o$K%i%s%G%V$NJVEz$,$G$-$k!#(B

$B!Z%(%i!<%3!<%I![(B

ER_ID       : $B%i%s%G%V%]!<%H(BID$B$,IT@5$G$"$k!#(B
ER_NOEXS    : $B%i%s%G%V%]!<%H$OB8:_$7$F$$$J$$!#(B
cal_por
 
$B%i%s%G%V8F=P(B

$B!Z7A<0![(B

WERR    cal_por(ID id, UW calptn, VP msg, W cmsz, TMOUT tmo)

$B!Z%Q%i%a!<%?![(B

ID      id          $B%i%s%G%V%]!<%H(BID
UW      calptn      $B8F=PB&A*Br>r7o(B (>0)
VP      msg         $B8F=P(B / $BJVEz%a%C%;!<%8(B
W       cmsz        $B8F=P%a%C%;!<%8%5%$%:(B ($B%P%$%H?t(B)
TMOUT   tmo         $B%?%$%`%"%&%H;XDj(B ($B%_%jIC(B)
        T_NOWAIT    $B%i%s%G%V$,@.N)$7$J$/$F$bBT$?$J$$(B
        T_FOREVER   $B%i%s%G%V$,@.N)$9$k$^$GBT$D(B
        >0          $B%i%s%G%V$,@.N)$9$k$^$G:GD9(B tmo $B%_%jICBT$D(B

$B!Z%j%?!<%sCM![(B

$B!d(B0   $B@5>o(B($BJVEz%a%C%;!<%8$N%P%$%H?t(B)
$B!c(B0   $B%(%i!<(B($B%(%i!<%3!<%I(B)

$B!Z2r@b![(B

$B%i%s%G%V8F=P$r9T$&!#(B $B%i%s%G%Vr7o$,K~$?$5$l$k$H%i%s%G%[email protected])$H$J$k!#(B $B;XDj$5$l$?BT$A;~4V$,7P2a$7$F$b%i%s%G%V$,@.N)$7$J$$>l9g$K$O!"(B ER_NONE $B$,JV$5$l$k!#(B $B%i%s%G%[email protected])8e$O!"%i%s%G%V$NJVEz$,$"$k$^$GBT$D!#(B

$B%i%s%G%V$O!"r7o$,[email protected])$9$k!#(B

( calptn & acpptn ) != 0    $B"h(B acpptn $B$O!"%i%s%G%Vr7o(B

$B%i%s%G%V$,@.N)$9$k$H!"(Bmsg $B$NFbMF$,%i%s%G%Vmsg $B$K3JG<$5$l!"(B $B$=$N%5%$%:$,LaCM$KJV$5$l$k!#(B

$B%i%s%G%V%]!<%H$N@8@.;~$K;XDj$7$?!"(B $B8F=P%a%C%;!<%8$N:GBg%5%$%:(B ( maxcmsz ) $B$h$jBg$-$J%a%C%;!<%8$rAw?.$9$k$3$H$O$G$-$J$$!#(B $B$^$?!"%5%$%:(B 0 $B$N%a%C%;!<%8$rAw?.$9$k$3$H$b$G$-$J$$!#(B

msg $B$K$O!"(B $B%i%s%G%V%]!<%H$N@8@.;~$K;XDj$7$?JVEz%a%C%;!<%8$N:GBg%5%$%:(B ( maxrmsz ) $B0J>e$NNN0h$,$J$/$F$O$J$i$J$$!#(B

$B!Z%(%i!<%3!<%I![(B

ER_DLT      : $B%i%s%G%V%]!<%H$,%i%s%G%[email protected])BT$A$N4V$K:o=|$5$l$?!#(B
ER_ID       : $B%i%s%G%V%]!<%H(BID$B$,IT@5$G$"$k!#(B
ER_MINTR    : $B%a%C%;!<%8%O%s%I%i$,5/F0$5$l$?$?$aBT$A=hM}$,CfCG$5$l$?!#(B
ER_NOEXS    : $B%i%s%G%V%]!<%H$OB8:_$7$F$$$J$$!#(B
ER_NONE     : $B%i%s%G%V$,@.N)$;$:$K%?%$%`%"%&%H$7$?!#(B
ER_PAR      : $B%Q%i%a!<%?$,IT@5$G$"$k!#(B
acp_por
 
$B%i%s%G%V

$B!Z7A<0![(B

WERR    acp_por(ID id, UW acpptn, W *rdv, VP msg, TMOUT tmo)

$B!Z%Q%i%a!<%?![(B

ID      id          $B%i%s%G%V%]!<%H(BID
UW      acpptn      $Br7o(B (>0)
W*      rdv         $B%i%s%G%VHV9f(B
VP      msg         $B8F=P%a%C%;!<%8(B
TMOUT   tmo         $B%?%$%`%"%&%H;XDj(B ($B%_%jIC(B)
        T_NOWAIT    $B%i%s%G%V$,@.N)$7$J$/$F$bBT$?$J$$(B
        T_FOREVER   $B%i%s%G%V$,@.N)$9$k$^$GBT$D(B
        >0          $B%i%s%G%V$,@.N)$9$k$^$G:GD9(B tmo $B%_%jICBT$D(B

$B!Z%j%?!<%sCM![(B

$B!d(B0   $B@5>o(B($B8F=P%a%C%;!<%8$N%P%$%H?t(B)
$B!c(B0   $B%(%i!<(B($B%(%i!<%3!<%I(B)

$B!Z2r@b![(B

$B%i%s%G%V$r

$B%i%s%G%V8F$S=P$7%?%9%/$,B8:_$7!"(B $BA*Br>r7o$,K~$?$5$l$k$H%i%s%G%[email protected])$H$J$k!#(B $B;XDj$5$l$?BT$A;~4V$,7P2a$7$F$b%i%s%G%V$,@.N)$7$J$$>l9g$K$O!"(B ER_NONE $B$,JV$5$l$k!#(B

$B%i%s%G%V$O!"r7o$,[email protected])$9$k!#(B

( calptn & acpptn ) != 0    $B"h(B calptn $B$O!"%i%s%G%V8F=PB&$NA*Br>r7o(B

$B%i%s%G%V$,@.N)$9$k$H!"(B $B$=$N%i%s%G%V$N<1JLHV9f$,(B rdv $B$KJV$5$l$k!#(B $B$=$7$F!"8F$S=P$7%a%C%;!<%8$,(B msg $B$K3JG<$5$l!"(B $B$=$N%5%$%:$,LaCM$KJV$5$l$k!#(B

msg $B$K$O!"(B $B%i%s%G%V%]!<%H$N@8@.;~$K;XDj$7$?8F=P%a%C%;!<%8$N:GBg%5%$%:(B ( maxcmsz)$B0J>e$NNN0h$,$J$/$F$O$J$i$J$$!#(B

$B!Z%(%i!<%3!<%I![(B

ER_DLT      : $B%i%s%G%V%]!<%H$,%i%s%G%[email protected])BT$A$N4V$K:o=|$5$l$?!#(B
ER_ID       : $B%i%s%G%V%]!<%H(BID$B$,IT@5$G$"$k!#(B
ER_MINTR    : $B%a%C%;!<%8%O%s%I%i$,5/F0$5$l$?$?$aBT$A=hM}$,CfCG$5$l$?!#(B
ER_NOEXS    : $B%i%s%G%V%]!<%H$OB8:_$7$F$$$J$$!#(B
ER_NONE     : $B%i%s%G%V$,@.N)$;$:$K%?%$%`%"%&%H$7$?!#(B
ER_PAR      : $B%Q%i%a!<%?$,IT@5$G$"$k!#(B
fwd_por
 
$B%i%s%G%V2sAw(B

$B!Z7A<0![(B

ERR fwd_por(ID id, UW calptn, W rdv, VP msg, W cmsz)

$B!Z%Q%i%a!<%?![(B

ID  id      $B%i%s%G%V%]!<%H(BID
UW  calptn  $B8F=PB&A*Br>r7o(B (>0)
W   rdv     $B%i%s%G%VHV9f(B
VP  msg     $B8F=P%a%C%;!<%8(B
W   cmsz    $B8F=P%a%C%;!<%8%5%$%:(B ($B%P%$%H?t(B)

$B!Z%j%?!<%sCM![(B

$B!a(B0  $B@5>o(B
$B!c(B0  $B%(%i!<(B($B%(%i!<%3!<%I(B)

$B!Z2r@b![(B

$B0lC6

$B8=:_$N%i%s%G%VAjl9g$K$O!"(B $B8F=P%?%9%/$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<%H$NJVEz%a%C%;!<%8$N:GBg%5%$%:$NJ}$,>.$5$$!#(B
            : $B%i%s%G%VHV9f$,IT@5$G$"$k!#(B
ER_PAR      : $B%Q%i%a!<%?$,IT@5$G$"$k!#(B
rpl_rdv
 
$B%i%s%G%VJVEz(B

$B!Z7A<0![(B

ERR rpl_rdv(W rdv, VP msg, W rmsz)

$B!Z%Q%i%a!<%?![(B

W   rdv     $B%i%s%G%VHV9f(B
VP  msg     $BJVEz%a%C%;!<%8(B
W   rmsz    $BJVEz%a%C%;!<%8%5%$%:(B ($B%P%$%H?t(B)

$B!Z%j%?!<%sCM![(B

$B!a(B0  $B@5>o(B
$B!c(B0  $B%(%i!<(B($B%(%i!<%3!<%I(B)

$B!Z2r@b![(B

$B%i%s%G%VAj

$B%i%s%G%V$rmaxrmsz ) $B$h$jBg$-$J%a%C%;!<%8$rJVEz$9$k$3$H$O$G$-$J$$!#(B $B$^$?!"%5%$%:(B 0 $B$N%a%C%;!<%8$rJVEz$9$k$3$H$b$G$-$J$$!#(B

$B!Z%(%i!<%3!<%I![(B

ER_OBJ      : $B%i%s%G%VHV9f$,IT@5$G$"$k!#(B
ER_PAR      : $B%Q%i%a!<%?$,IT@5$G$"$k!#(B

$B$3$N>O$NL\
$BA0JG(B:1.2 $B%a%C%;!<%84IM}$K$b$I$k(B
$B4IM}$K$9$9$`(B