> I believe it is correct. If you call pthread_create() from init_module(),
> the newly created RTthread starts running _immediately_ and you may be
> unsure when the init_module() will be finished. This means, finishing
> init_module() depends on when the RTthread gives up CPU. 
> Regards, pa

Yes, as I said, I agree in theory. But I just tried switching it around in
some code of mine so that I call pthread_setfp_np just before I call
pthread_create, and I get a seg fault, my thread doesn't work, and it
can't be remove. I'm about to reboot to get rid of it.

Setup the other way (ie. with pthread_setfp_np just after pthread_create)
my periodic thread runs fine, correctly calling some >100 floating point
functions from math.h every 100 micro seconds. [For those concerned, the
seg fault occurred when I was running a scaled down code, calling only
10 fp math.h fxns each 200 micro seconds, - a very minimal load thread.]

So why does it work when I do it wrong, but not when I do it right?
Anyone? (dmesg output below for those who can read it)
-Chuck


(The first couple lines _could_ be unrelated)

>> (large header stripped)
...
Unable to handle kernel NULL pointer dereference at virtual address
00000088
current->tss.cr3 = 057d5000, %cr3 = 057d5000
*pde = 00000000
Oops: 0000
CPU:    0
EIP:    0010:[<c8050bf9>]
EFLAGS: 00010246
eax: 00000001   ebx: 00000000   ecx: 00000000   edx: c1803000
esi: c8056620   edi: c8047000   ebp: c2d6ff10   esp: c2d6ff0c
ds: 0018   es: 0018   ss: 0018
Process insmod (pid: 1660, process nr: 42, stackpage=c2d6f000)
Stack: c8047000 c2d6ff3c c8096dc3 00000000 00000001 c8096000 00001f40
00000001 
       00000000 00000000 00000040 00000000 c8097900 c0115c2f c2d6e000
0808bd58 
       080624a0 bfffe5dc 00000000 c8097900 c2d6ff78 c2d6ff70 00000009
c2d6e000 
Call Trace: [<c8047000>] [<c8096dc3>] [<c8096000>] [<c8097900>]
[<c0115c2f>] [<c8097900>] [<c806b000>] 
       [<c8096048>] [<c0109040>] 
Code: 83 bb 88 00 00 00 00 74 11 68 00 1f 05 c8 e8 34 72 ff ff b8 


-- [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/

Reply via email to