|
̾??splbio , splclock ,
splhigh , splimp ,
splnet , splsoftclock ,
splsofttty , splstatclock ,
spltty , splvm ,
spl0 , splx —
????????ͥ???٤?????
????<sys/types.h>
<sys/systm.h>
intrmask_t
splbio (void)
intrmask_t
splclock (void)
intrmask_t
splhigh (void)
intrmask_t
splimp (void)
intrmask_t
splnet (void)
intrmask_t
splsoftclock (void)
intrmask_t
splsofttty (void)
intrmask_t
splstatclock (void)
intrmask_t
spltty (void)
void
spl0 (void)
void
splx (intrmask_t ipl)
???????? API ?Ͽ侩?????Ƥ??ޤ?????
?ǡ?????¤???ݸ?뤿???ˤϡ?????????
mutex ?????Ѥ??ޤ??? ?ܺپ?????
mutex(9)
?Ȥ??Ƥ?????????
?̾綠?줾???γ??????ߤ????Ѥ????ɥ饤?Фϡ? config ?ե??????Υ?????ɤˤ??ä? 1 ?Ĥ? ????????ͥ???٥??롼?פ˳??????Ƥ????ޤ??? ?㤨?С? device foo0 at isa? port 0x0815 irq 12 tty ?ϡ????????? 12 ?? “tty” ͥ???٥??롼?פ˳??????Ƥޤ??? ?????ƥ??ϼ?ưŪ?? xxx ???롼?פγ??????ߤ?ͥ???٤? splxxx () ?ʾ??λ??˸ƤФ????褦?˽??????ޤ???
?????????ʥǥХ????ɥ饤?Фγ???????ͥ???٥??롼?פ?????Ū?ʳ??????Ƥϡ? ?????褽???Τ褦??ʬ???Ǥ??ޤ???
??????splx () ?????? spl0 ()
?ʳ??????Ƥδؿ??ϡ?????????ͥ???٤??ͤ??֤??ޤ???
???????ʲ??ϡ?ɸ??Ū?ʻ??????Ǥ???struct foo_softc { ... int flags; #define FOO_ASLEEP 1 #define FOO_READY 2 } foo_softc[NFOO]; int foowrite(...) { struct foo_softc *sc; int s, error; ... s = spltty(); if (!(sc->flags & FOO_READY)) { /* ???????Ǥ??Ƥ??ޤ??????Ե????ʤ????Фʤ??ޤ??? */ sc->flags |= FOO_ASLEEP; error = tsleep(sc, PZERO, "foordy", 0); sc->flags &= ~FOO_ASLEEP; } sc->flags &= ~FOO_READY; splx(s); ... } void foointr(...) { struct foo_softc *sc; ... sc->flags |= FOO_READY; if (sc->flags & FOO_ASLEEP) /* ï?????桹???ԤäƤ??ޤ??????????Ƥ??????? */ wakeup(sc); ... } ????????????ͥ???٥??٥????????ΥС????????? UNIX ???о줷?ޤ????? ????Ū?ˤ?̾???ǤϤʤ????????Ȥ????Ƥ??ơ????Υ??٥??ޤǤ????Ƥ??ޤ??? (ͥ???? 5 ?ϥ??٥? 5 ?ޤǤ????Ƥ??֥??å????ޤ?)?????????Τ????Ƥ??ޤ??? ?????? FreeBSD ?ˤϤ??ƤϤޤ??ޤ????? ????Ū??̾?? ‘level ’
?Ϥ??ޤ???ʸ?? ‘l ’
?Ȥ??Ƥ??줾???δؿ????ѿ???̾????ȿ?Ǥ????Ƥ??ޤ???
?????????ºݤˤϤ??Ϥ????٥??ǤϤʤ???
?ष???ۤʤä?(??ʬŪ?˴ޤޤ줿)?ؿ??????????ƥ??Τ??????֥֥??å??????ޤ???
????Ū???ֹ??ˤ?????ˡ??ñ???ǽ????̤???
????????ͥ???٥??٥륰?롼?פǤ????Ȥߤʤ??????Ǥ??ޤ???
???????Υޥ˥奢???ڡ????? Jörg Wunsch ???ޤ?????
Visit the GSP FreeBSD Man Page Interface. |