📄 rtai-refguide.ps
字号:
b(which)0 1574 y(could)k(be)f(used)h(as)f(a)g(tutorial)h(to)g(learn)f(how)i(R)m(T)-6 b(AI)24 b(works)i Fd(and)e Fj(as)g(a)g(r)o(efer)o(ence)f(for)h(all)h(the)f(dif)o(fer)o(ent)f(sub)i(packets)f(and)01674 y(functions)e(the)f(framework)f(pr)o(ovides.)0 1820y(The)j Fd(R)-5 b(T)d(AI)23 b(3.0)f(Refer)o(ence)i(Guide)fFj(tries)g(to)g(solve)g(this)h(pr)o(oblem.)31 b(It)23b(is)g(an)g(attempt)f(to)i(unify)f(all)f(the)h(existing)h(documenta-)01920 y(tion)i(of)g(the)g(R)m(T)-6 b(AI)25 b(pr)o(oject,)h(which,)i(until)e(now)-8 b(,)28 b(existed)d(in)h(several)f(places)g(like)g(the)h(sour)o(cecode,)g(the)g(web)f(site,)i(some)0 2019 y(READMEs)20b(and)h(other)g(locations.)p Black 0 2351 a Fe(1.2)61b(R)n(T)-11 b(AI)34 b(Histor)q(y)p Black 0 2587 a Fc(\(FIXME:)21b(add)e(earlier)h(R)-5 b(T)d(AI)21 b(history)g(here\))02733 y Fj(During)34 b(all)f(this)h(time)g(the)f(policy)h(of)f(the)g(maintainers)h(was)f(to)g(add)g(almost)g(every)g(piece)g(of)g(contributed)g(code)g(to)0 2833 y(the)f(R)m(T)-6 b(AI)31b(packet,)j(because)d(the)h(idea)f(was)g(that)h(if)g(something)h(was)f(useful)g(for)f(somebody)i(it)f(could)g(be)f(useful)h(for)02933 y(somebody)19 b(else)g(as)f(well.)25 b(R)m(T)-6b(AI)18 b(was)g(or)o(ganized)g(after)f(the)i(Bazaar)d(development)i(model)h(described)e(by)i(Eric)f(Raymond)0 3032 y([)pFc(?)p Fj(].)55 b(Although)32 b(this)g(model)f(worked)h(quite)f(\002ne)g(for)g(several)f(years)h(it)g(turned)g(out)g(over)g(the)g(time)h(that)e(this)i(model)0 3132 y(r)o(esulted)27 b(in)h(lots)h(of)f(featur)o(es)e(existing)j(in)f(several,)h(incompatible)f(implementations)h(which)g(wher)o(e)f Fd(almost)f Fj(identical)0 3231 y(but)22b(not)h(r)o(eally)-9 b(.)29 b(And,)22 b(after)e(all,)j(the)f(\224or)o(ganic)f(gr)o(ow\224)h(of)g(the)g(code)g(r)o(esulted)f(in)i(lar)o(ge)e(pieces)h(of)g(code)g(which)h(wer)o(e)e(less)0 3331 y(and)28b(less)h(maintainable)f(and)f(could)i(not)g(easily)f(be)g(separated)f(into)i(independend)f(modules.)49 b(It)28 b(turned)g(out)h(that)f(in)03431 y(the)f(futur)o(e,)g(user)f(space)g(har)o(d)g(r)o(ealtime)f(would)i(mor)o(e)g(and)f(mor)o(e)g(r)o(eplace)f(the)i(traditional)g(design)g(of)f(HR)m(T)h(in)h(kernel)0 3530 y(modules)21 b(in)h(combination)g(with)g(userland)e(tools)i(for)f(the)g(handling)g(of)g(non-r)o(ealtime)g(tasks.)26 b(This)21 b(tr)o(end)f(was)h(followed)0 3630y(with)g(with)g(the)g(LXR)m(T)-6 b(,)20 b(LXR)m(T)-5b(-Informed)21 b(and)f(New-LXR)m(T)g(implementations)i(of)e(userspace)g(r)o(ealtime,)f(but)h(it)h(was)f(clear)0 3730 y(that)h(the)g(futur)o(e)e(could)i(only)h(be)e(based)g(on)i(a)e(better)g(str)o(uctur)o(ed)g(code)g(base.)0 3876 y(On)30 b(the)g(Har)o(dwar)o(e)d(Abstraction)i(Layer)-6 b(,)30 b(the)g(lowlevel)g(interface)e(between)i(the)f(har)o(dwar)o(e)e(and)i(the)h(basic)f(interr)o(upt)0 3976 y(mechanisms)f(of)f(R)m(T)-6 b(AI,)26 b(\224R)m(THAL\224)g(was)h(used)g(for)f(most)i(of)f(the)g(time.)45 b(The)27 b(R)m(THAL)f(mechanism)i(was)f(basically)f(the)0 4075 y(same)17 b(technique)i(which)f(was)g(used)g(by)f(R)m(T)-5b(-Linux:)25 b(a)17 b(deferr)o(ed)e(interr)o(upt)j(scheme.)25b(Although)18 b(the)g(mechanism)h(worked)0 4175 y(quite)29b(\002ne)h(it)f(was)g(a)f(tar)o(get)g(of)h(lar)o(ge)f(and)g(unfr)o(uitful)h(discussions,)k(trigger)o(ed)27 b(by)i(the)h(infamouse)f(R)m(T)-5 b(-Linux)29 b(patent,)0 4275 y(\002led)23 b(by)h(V)-5b(ictor)24 b(Y)-8 b(odaiken)24 b(in)g(1997)e([)p Fc(?)oFj(].)33 b(T)-8 b(o)25 b(end)e(these)g(contrapr)o(oductive)g(discussions)i(and)e(to)h(base)f(R)m(T)-6 b(AI)23 b(on)h(a)f(mor)o(e)04374 y(\003exible)e(technology)h(Karim)e(Y)-8 b(aghmour)22b(published)f(an)f(article)g(about)h(\224ADEOS)e(-)h(Adaptive)g(Domains)h(for)g(Operating)0 4474 y(Systems\224)27 b(in)i(2000)c(\(?)46b(FIXME\))27 b(in)i(which)f(he)g(described)e(a)i(technology)h(which)f(could)g(be)g(used)f(for)g(mor)o(e)h(than)g(har)o(d)04573 y(r)o(ealtime.)53 b(Using)30 b(a)g(technology)h(which)g(is)g(used)f(by)g Fd(mor)o(e)g Fj(people)g(is)g(generally)g(a)g(Good)h(Thing)g(\(TM\),)d(because)h(the)0 4673 y(mor)o(e)g(people)g(use)h(a)e(piece)h(of)g(code)g(the)h(better)f(it's)g(quality)h(would)g(be.)51b(As)29 b(ADEOS)g(could)g(also)h(be)f(used)g(to)h(make)04773 y(several)23 b(instances)i(of)g(Linux)f(r)o(un)h(on)g(a)f(machine)h(at)f(the)g(same)g(time,)i(or)e(to)h(make)f(glueless)h(kernel)f(debuggers,)h(it)g(was)0 4872 y(consider)o(ed)f(to)h(be)f(a)g(candidate)f(for)i(the)f(har)o(dwar)o(e)e(abstraction)j(layer)f(of)g(the)h(Next)f(Generation)h(R)m(T)-6 b(AI.)24 b(And,)h(last)f(but)04972 y(not)e(least,)e(as)h(the)g(technology)h(used)f(by)g(ADEOS)f(is)i(known)g(and)e(published)h(for)g(quite)h(a)e(long)i(term)f(this)h(would)f(\002nally)0 5072 y(end)g(the)f(uggly)i(patent)e(discussion)i(with)g(all)e(it's)i(fear)-6 b(,)19 b(uncertaincy)h(and)h(doubt.)05218 y(In)29 b(2002)d(the)i(R)m(T)-6 b(AI)28 b(team)g(started)f(to)i(think)g(about)f(a)g(lar)o(ge)f(r)o(edesign)h(to)g(make)g(R)m(T)-6b(AI)28 b(\002t)h(for)f(the)g(\224Next)g(Generation\224)05318 y(of)c(r)o(ealtime)e(softwar)o(e.)34 b(It)23 b(all)h(started)f(with)h(Philippe)g(Ger)o(um)h(implementing)g(the)f(ADEOS)f(technology)i(described)d(by)0 5417 y(Karim)g(Y)-8 b(aghmour)i(.)31b(The)22 b(next)g(move)g(was)g(that)g(the)h(existing)f(code)g(base)g(of)g(R)m(T)-6 b(AI)22 b(was)g(split)g(into)h(several)e(logical)i(units)0 5517 y(which)e(could)e(be)h(maintained)f(as)h(independend)f(packets.)25 b(Until)20 b(now)-8 b(,)21 b(people)e(had)g(to)h(install)h(the)f(whole)g(R)m(T)-6 b(AI)20 b(packet,)0 5617 y(no)27b(matter)f(if)h(they)g(needed)f(everything)h(or)g(not.)43b(It)27 b(was)g(dif)o(\002cult)f(to)h(\002nd)g(out)g(how)h(things)f(worked)g(together)g(and)f(it)0 5716 y(was)i(dif)o(\002cult)f(for)h(people)g(to)g(\002nd)h(their)f(way)g(into)h(the)f(R)m(T)-6b(AI)28 b(development)g(team.)47 b(All)28 b(this)g(should)h(become)f(better)p Black Black 3927 6065 a(9)p Black Black eop%%Page: 10 1010 9 bop Black 0 TeXcolorgray Black Black 0 -170 a Ff(1)41b(Pr)o(eface)p Black 0 -125 3969 4 v Black 0 108 a Fj(and)23b(easier)h(with)g(the)g(next)g(major)h(r)o(elease.)33b(Philippe)24 b(Ger)o(um)h(started)e(to)h(r)o(eor)o(ganize)e(the)i(R)m(T)-6 b(AI)24 b(tr)o(ee)f(with)h(help)g(of)g(the)0 207y(development)d(team.)k(At)20 b(the)h(end)g(of)g(2003)d(the)j(\002rst)g(r)o(elease)e(of)i(the)g(\224new\224)f(R)m(T)-6 b(AI)21b(was)f(r)o(eleased.)p Black 0 543 a Fe(1.3)61 b(P)l(ar)r(ticipating)35b(in)f(the)f(R)n(T)-11 b(AI)34 b(T)-7 b(eam)p Black 0782 a Fj(R)m(T)h(AI)24 b(has)g(always)g(been)g(a)f(community)j(ef)o(fort,)d(and)h(this)h(will)f(not)h(change)f(with)h(the)f(\224new\224)g(R)m(T)-6 b(AI.)23 b(Although)i(we)g(try)0 882 y(to)h(put)g(a)f(better)g(\224str)o(uctural)g(design\224)h(behind)g(the)g(softwar)o(e)e(the)i(team)g(still)g(follows)h(Paolo)f(Mangegazza's)d(idea)i(of)h(a)0981 y(community)d(ef)o(fort.)28 b(Things)23 b(that)f(ar)o(e)e(useful)i(for)g(somebody)g(will)h(still)g(\002nd)f(it's)g(way)g(into)h(the)f(package,)f(although)h(the)0 1081 y(maintainers)f(try)g(to)g(make)f(the)h(\224big)g(plan\224)f(behind)h(R)m(T)-6 b(AI)20b(mor)o(e)h(visible)g(to)g(the)g(outside.)0 1230 y(It)h(is)h(most)h(important)e(that)h(people)f(do)h(not)g(only)g Fd(work)gFj(with)g(R)m(T)-6 b(AI)22 b(but)h Fd(actively)e(participate)gFj(in)i(the)f(R)m(T)-6 b(AI)23 b(development)0 1330 y(team.)53b(It)30 b(is)g(easier)f(than)i(ever)e(to)h(do)g(this)h(today:)44b(the)30 b(\224R)m(T)-6 b(AI-Dev\224)28 b(mailing)j(list)f(was)g(opened)g(up)g(for)g(the)g(general)0 1430 y(public)24b(so)g(that)g(everybody)g(can)f(see)h(what)g(the)g(developers)g(ar)o(e)e(doing)j(and)e(how)i(R)m(T)-6 b(AI)24 b(continues)h(evolving.)36b(Who)24 b(is)0 1529 y(inter)o(ested)e(in)h(joining)i(the)d(team)h(can)f(simply)i(subscribe)e(the)h(R)m(T)-6 b(AI-Dev)22 b(mailing)i(list)f(and)f(help)h(making)g(R)m(T)-6 b(AI+Linux)0 1629 y(the)29b(best)g(r)o(ealtime)e(operating)i(system)h(which)f(ever)f(existed.)49b(One)30 b(of)e(the)h(most)h(important)f(pr)o(operties)f(of)h(the)g(R)m(T)-6 b(AI)0 1728 y(team)26 b(is)h(that)f(it)g(is)h(a)f(team)g(\226)g(people)g(try)g(to)h(achieve)f(a)f(goal)i(by)f(working)i(together)-6b(.)42 b(It)26 b(always)h(has)f(been)g(fun)g(for)g(the)01828 y(team)19 b(members)h(to)g(develop)f(R)m(T)-6 b(AI)19b(in)h(a)f(cooperative)g(and)g(constr)o(uctive)h(way)-9b(,)19 b(and)g(we)h(hope)f(that)h(this)g(will)g(not)h(change)01928 y(in)g(the)g(near)f(futur)o(e.)0 2077 y(People)29b(who)h(want)f(to)g(participate)f(in)h(the)g(R)m(T)-6b(AI)29 b(development)g(should)h(\002rst)f(subscribe)g(the)g(mailing)h(lists.)51 b(Further)0 2177 y(details)20 b(can)h(be)f(found)h(on)g(the)g(website.)p Black Black 0 6065 a(10)p Black Black eop%%Page: 11 1111 10 bop Black 0 TeXcolorgray Black Black Black 0 594a Fi(2)86 b(Intr)m(oduction)p Black Black 0 1152 a Fe(2.1)61b(What)33 b(is)h(Realtime?)p Black Black 0 1440 a(2.2)61b(The)34 b(R)n(T)-11 b(AI)34 b(Concept)p Black Black0 1696 a Fh(2.2.1)50 b(T)-6 b(ec)o(hnology)p Black Black0 1920 a(2.2.2)50 b(Notes)29 b(on)e(the)h(R)n(T)-9 b(AI)28b(Release)h(Numbering)d(Sc)o(heme)p Black Black 0 2145a(2.2.3)50 b(Ar)n(c)o(hitecture)p Black Black 0 2369a(2.2.4)g(R)n(T)-9 b(AI')j(s)28 b(Ser)q(vices)p BlackBlack 0 2627 a Fe(2.3)61 b(Do)n(wnloading)35 b(R)n(T)-11b(AI)p Black Black 0 2883 a Fh(2.3.1)50 b(Do)o(wnloading)26b(Of\002cial)h(Releases)p Black Black 0 3107 a(2.3.2)50b(Accessing)29 b(CVS)p Black Black 0 3365 a Fe(2.4)61b(Con\002guring)34 b(and)f(Building)i(R)n(T)-11 b(AI)pBlack Black 0 3620 a Fh(2.4.1)50 b(The)28 b(Con\002guration)f(System)pBlack Black 0 3845 a(2.4.2)50 b(Making)p Black Black0 4102 a Fe(2.5)61 b(The)34 b(Make\002le)h(System)p BlackBlack 0 4358 a Fh(2.5.1)50 b(Making)28 b(Extensions)h(f)n(or)f(R)n(T)-9b(AI)p Black Black 0 4582 a(2.5.2)50 b(Writing)27 b(Separate)j(Make\002les)p Black Black Black 3885 6065 a Fj(11)pBlack Black eop%%Page: 12 1212 11 bop Black 0 TeXcolorgray Black Black 0 -170 a Ff(2)41b(Intr)o(oduction)p Black 0 -125 3969 4 v Black BlackBlack 0 6065 a Fj(12)p Black Black eop%%Page: 13 1313 12 bop Black 0 TeXcolorgray Black Black Black 0 594a Fi(3)86 b(De)m(velopment)48 b(Fundamentals)p BlackBlack 0 1152 a Fe(3.1)61 b(K)n(ernel)34 b(Module)g(Basics)pBlack Black 0 1407 a Fh(3.1.1)50 b(Building)27 b(a)h(K)o(ernel)f(Module)p Black Black 0 1632 a(3.1.2)50 b(Expor)r(ting)28b(Symbols)p Black Black 0 1856 a(3.1.3)50 b(P)m(assing)29b(P)m(arameter)o(s)g(to)f(Modules)p Black Black Black3885 6065 a Fj(13)p Black Black eop%%Page: 14 1414 13 bop Black 0 TeXcolorgray Black Black 0 -170 a Ff(3)41b(Development)21 b(Fundamentals)p Black 0 -125 3969 4v Black Black Black 0 6065 a Fj(14)p Black Black eop%%Page: 15 1515 14 bop Black 0 TeXcolorgray Black Black Black 17461969 a Fi(P)-5 b(ar)s(t)48 b(II)p Black 1278 2434 a Fl(The)58b(R)l(T)-19 b(AI)59 b(Core)p Black Black Black Black3885 6065 a Fj(15)p Black Black eop%%Page: 16 1616 15 bop Black 0 TeXcolorgray Black Black Black Blackeop%%Page: 17 1717 16 bop Black 0 TeXcolorgray Black Black Black 17221969 a Fi(P)-5 b(ar)s(t)48 b(III)p Black 1300 2434 aFl(R)l(T)-19 b(AI)59 b(Ser)r(vices)p Black Black BlackBlack 3885 6065 a Fj(17)p Black Black eop%%Page: 18 1818 17 bop Black 0 TeXcolorgray Black Black Black Blackeop%%Page: 19 1919 18 bop Black 0 TeXcolorgray Black Black Black 0 594a Fi(4)86 b(Interpr)m(ocess)47 b(Comm)m(unication)p BlackBlack 0 1152 a Fe(4.1)61 b(FIFOs)p Black Black 0 1407a Fh(4.1.1)50 b(Over)q(vie)o(w)p Black 0 1615 a Fj(In)18b(a)f(well)i(designed)e(R)m(T)-6 b(AI)18 b(application)f(you)i(usually)f(have)f(a)h(clear)e(separation)i(between)f(time)i(critical)e(and)g(non-critical)0 1715 y(parts)j(of)h(the)g(code.)k(This)c(means)g(that)g(you)g(have)f(to)i(transport)e(data)g(fr)o(om)g(r)o(ealtime)g(land)h(to)g(userland)f(and)g(vice)h(versa.)0 1864 y(R)m(T)-6b(AI)24 b(of)o(fers)g(several)f(interpr)o(ocess)i(communication)h(mechanisms)f(for)g(this)g(task.)37 b(One)25 b(of)f(the)h(easiest)f(method)h(is)g(the)0 1964 y(use)f(of)g(FIFOs.)35 b(After)23b(a)g(FIFO)h(was)g(cr)o(eated)e(you)i(can)g(simply)g(\224put\224)f(some)h(data)f(into)i(it)f(fr)o(om)f(one)h(envir)o(onment)h(\(e.)13b(g.)0 2063 y(fr)o(om)20 b(userland\))g(and)h(r)o(ead)e(it)i(later)f(\226)g(in)h(the)g(same)g(or)o(der)e(\226)i(fr)o(om)f(the)h(other)g(envirionment)h(\(e.)13 b(g.)25 b(fr)o(om)c(kernel)g(space\).)pBlack 0 2356 a Fh(4.1.2)50 b(FIFO)27 b(creation)p Black0 2564 a Fj(T)-8 b(o)21 b(cr)o(eate)e(a)i(FIFO)g(you)g(can)g(use)f(this)i(function:)p Black Black 0 2796 a Fb(rtf_create)48b(\(unsigned)g(int)h(minor,)g(int)g(size\))0 3029 y Fc(NAME)03178 y(rtf)p 97 3178 25 4 v 30 w(create)19 b(\(unsigned)g(int)g(minor)-5 b(,)21 b(int)f(size\))0 3328 y Fj(minor:)47 b(&)30b(minor)i(device)e(number)h(of)g(the)g(\002fo)g(size:)45b(&)31 b(buf)o(fer)e(size)h(for)h(\002fo)g(data;)k(this)c(can)g(be)f(r)o(esized)g(later)g(with)0 3427 y(rtf)p 93 3427 V 29 w(r)o(esize\(\))03577 y Fc(RETURN)20 b(V)-11 b(ALUE)0 3726 y Fj(0)20 b(on)i(success)f(-ENODEV)f(illegal)h(\002fo)g(minor)g(number)g(-ENOMEM)e(out)j(of)e(memory)p Black 0 4019 a Fh(4.1.3)50 b(Handler)o(s)pBlack Black 0 4243 a(4.1.4)g(Signal)28 b(Interface)pBlack Black 0 4468 a(4.1.5)50 b(Select/P)l(oll)29 b(and)f(Bloc)n(king)pBlack Black 0 4692 a(4.1.6)50 b(Named)28 b(FIFOs)p BlackBlack 0 4916 a(4.1.7)50 b(API)28 b(Ref)o(erence)p BlackBlack 0 5141 a(4
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -