Hi,
[EMAIL PROTECTED] wrote:
> So you make RT calls via "int something" ? How do you deal with
> the memory map? Does the RT system switch mmu context?
RTAI makes "int something", directly on the idt_table, for:
- its sysreqs;
- shared memory, no need of Linux drivers;
- LXRT calls.
LXRT does all what Linux does in switching its processes, i.e:
rthal.gdt_table[next->tss.tr >> 3].b &=
0xfffffdff;
asm volatile("ltr %0": :"g" (*(unsigned short
*)&next->tss.tr));
asm volatile("movl %%fs,%0":"=m" (*(int
*)&prev->tss.fs));
asm volatile("movl %%gs,%0":"=m" (*(int
*)&prev->tss.gs));
if (next->mm->segments !=
prev->mm->segments)
asm volatile("lldt %0": :"g" (*(unsigned short*)
&next->tss.ldt));
{
unsigned long new_cr3 =
next->tss.cr3;
if (new_cr3 !=
prev->tss.cr3)
asm volatile("movl %0,%%cr3": :"r"
(new_cr3));
}
loadsegment(fs,next->tss.fs);
loadsegment(gs,next->tss.gs);
The above core switching is in fact copied verbatim from Linux. I do not
know if that means what you call mmu context switch.
In that way it switches Linux processes: run anew, forked,
pthread_created.
That without touching anything in Linux but an internal scheduler
variable (weight) that is simply exported.
By using LXRT you can mix: Linux processes, hard real time in user
space, kernel hard real time tasks, all sinchronized inter-intra
themselves and interrupt handlers by using RTAI APIs.
Ciao, Paolo.
-- [rtl] ---
To unsubscribe:
echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
echo "unsubscribe rtl <Your_email>" | mail [EMAIL PROTECTED]
---
For more information on Real-Time Linux see:
http://www.rtlinux.org/rtlinux/