l4-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

is there anybody practice on L4_ExchangRegsiter in Pistachio-0.2 succeed


From: Yu Neil
Subject: is there anybody practice on L4_ExchangRegsiter in Pistachio-0.2 succeeded ?
Date: Tue, 23 Sep 2003 19:11:45 +0800

hello everyone:
i practice on l4 system call L4_ExchangeRegister(), but never succeeded. In the previouse version Nazelnut, It`s okay
  Followed it`s my code
+++++
L4_ThreadId_t thread = id_of_roottask;
thread.global.X.thread_no =  thread.global.X.thread_no +1;
thread.local.X.local_id =  thread.local.X.local_id +1;

unsigned int sp = 0x263370;
unsigned int ip = 0x260000;

L4_Word_t dummy;
L4_ThreadId_t                    dummy_id;

// L4_Start_SpIp( thread, (unsigned int )(void *) ip, (unsigned int ) (void *) sp); L4_ThreadId_t result = L4_ExchangeRegisters (thread, (3 << 3), sp, ip, 0, 0, L4_nilthread,
                                 &dummy, &dummy, &dummy, &dummy, &dummy,
                                 &dummy_id);

printf(":: result [%x]\n",result.raw );
+++++++++++++
It always return the zero
Is there any differece in two verions ? Is there need to allocate a space for Utcb per thread ( i done it ) ?

dump sections
+++++++++++++
Sections:
Idx Name          Size      VMA       LMA       File off  Algn
 0 .text         0000099c  00250000  00250000  00001000  2**4
                 CONTENTS, ALLOC, LOAD, READONLY, CODE
 1 .data         00000560  002509a0  002509a0  000019a0  2**5
                 CONTENTS, ALLOC, LOAD, DATA
 2 .bss          00002800  00250f00  00250f00  00001f00  2**5
                 ALLOC
 3 .eh_frame     0000019c  00253700  00253700  00002700  2**2
                 CONTENTS, ALLOC, LOAD, DATA
 4 preempter     00007d48  00260000  00260000  00003000  2**5
                 CONTENTS, ALLOC, LOAD, CODE
 5 .note         0000003c  00000000  00000000  0000ad48  2**0
                 CONTENTS, READONLY
 6 .comment      000000a5  00000000  00000000  0000ad84  2**0
                 CONTENTS, READONLY
 7 .stab         0000072c  00000000  00000000  0000ae2c  2**2
                 CONTENTS, READONLY, DEBUGGING
+++++++++++++++++


Neil Yu

_________________________________________________________________
与联机的朋友进行交流,请使用 MSN Messenger: http://messenger.msn.com/cn




reply via email to

[Prev in Thread] Current Thread [Next in Thread]