GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
SPL(9) FreeBSD Kernel Developer's Manual SPL(9)

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) ?򻲾Ȥ??Ƥ?????????

spl() ?ؿ??ե??ߥ??? CPU ?γ???????ͥ???٤? “???٥?” ?????ꤷ?ޤ??? ?????ϥ֥??å????줿ͥ???٥??٥??γ??????ߥϥ??ɥ??μ¹Ԥ????????ޤ??? ???????ߥϥ??ɥ??ˤ??ä?Ĵ?????뤤?Ͻ??????줿?Ǥ??????ǡ????ΰ??? Ĵ?????뤤?Ͻ????????ɥ饤?Ф? “synchronous” ??ʬ(?桼???ץ?????????ɽ???Ƽ¹Ԥ???????ʬ)?ǻ??Ѥ????ޤ???

?̾綠?줾???γ??????ߤ????Ѥ????ɥ饤?Фϡ? config ?ե??????Υ?????ɤˤ??ä? 1 ?Ĥ? ????????ͥ???٥??롼?פ˳??????Ƥ????ޤ??? ?㤨?С?

device foo0 at isa? port 0x0815 irq 12 tty

?ϡ????????? 12 ?? “tty” ͥ???٥??롼?פ˳??????Ƥޤ??? ?????ƥ??ϼ?ưŪ?? xxx ???롼?פγ??????ߤ?ͥ???٤? splxxx () ?ʾ??λ??˸ƤФ????褦?˽??????ޤ???

splx() ?ؿ??ϳ???????ͥ???٥??٥???????Ū?ʿ??ͤ????ꤷ?ޤ??? ???????̤γ??????ߥ??٥??ؿ????֤????ͤ????????????ѿ?????¸???ơ? ???Ǹ???ͥ???٥??٥????᤹?????? splx() ?????Ѥ????????տޤ??Ƥ??ޤ???

spl0() ?ؿ??????Ƥγ??????ߥϥ??ɥ????֥??å????ʤ??ͤ?ͥ???٤򸺾??????ޤ??? ????????AST(??Ʊ???????ƥ??ȥ??å?)?ϥ????ƥब ?桼???⡼?ɤ??????ޤǤδ֤ϥ֥??å??????ޤ???

?????????ʥǥХ????ɥ饤?Фγ???????ͥ???٥??롼?פ?????Ū?ʳ??????Ƥϡ? ?????褽???Τ褦??ʬ???Ǥ??ޤ???

splnet()
?ͥåȥ?????󥿥ե??????ɥ饤?ФΥ??եȥ???????ʬ??
splimp()
???ƤΥͥåȥ?????󥿥ե??????ɥ饤?С?
splbio()
???Ƥ? ?Хåե??????? (?Ĥޤ??ǥ??????ʤ?)?Υɥ饤?С?
spltty()
????Ū?ˤϥͥåȥ???ʳ????̿??ǥХ????Ǥ????? ???¾??ϥͥåȥ???ȥǥ??????ʳ??????ƤΥɥ饤?С?

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 ???񤭤ޤ?????
July 21, 1996 FreeBSD 13.1-RELEASE

Search for    or go to Top of page |  Section 9 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.