Fusion - outb/iopl crash, thread local storage
Philippe Gerum
rpm at xenomai.org
Tue Jul 19 22:24:42 CEST 2005
Pramode C.E wrote:
> Hello,
>
> I am using fusion-0.8.2 with kernel 2.6.12 on a Fedora Core 3 system.
> I have a simple RT task which toggles the parallel port pins:
>
> ..................
> while(1) {
> outb(c, 0x378);
> c = ~c;
> rt_task_wait_period();
> }
> ..................
>
> The code is crashing with a segmentation fault even though I am calling
> iopl(3) successfully (this is exactly the problem which Vincent
> Levesque had and was
> posted on this list some time back). It seems to work OK if the iopl call is
> repeated before every outb.
>
> I tried one experiment - I renamed my /lib/tls to /lib/tlsold. Now, the code
> seems to be working OK. Is there some link between this problem and
> thread local storage?
>
I have no clue yet; the native API indeed uses TLS for some limited
purpose, but I can't find an obvious reason why this should have an
impact on i/o permissions. I'll have a look at this asap, I first need
to reproduce this issue.
--
Philippe.
More information about the Rtai
mailing list