[okl4-developer] [PATCH] broken NONEXISTANT_TID in l4test on 64bit archs
Tomas Hruby
thruby at cs.otago.ac.nz
Tue Sep 23 14:50:33 EST 2008
Hi,
> static const L4_ThreadId_t NONEXISTANT_TID = L4_GlobalId(0x133714, 1);
>
> It will properly construct a thread ID for you :-)
Yeah, I've tried that but the compiler was complaining that the
initialization is not static :( It would work if L4_GlobalId was a
macro not a function.
T.
> - jsok
>
> On 23/09/2008, at 2:31 PM, Tomas Hruby wrote:
>
>> The 32bit constant (0x13371401UL) does not set the thread_no field of
>> the L4_ThreadId_t which causes failure in IPC0700 test in l4test suite
>> since the thread_no is 0 and lookup_ipc_cap_locked() returns a valid
>> tcb. The patch splits the original value (probably anything random
>> would work as well) and sets thread_no and version separately.
>>
>> diff -ur orig/l4test/src/ipc.c fix/l4test/src/ipc.c
>> --- orig/l4test/src/ipc.c 2008-09-23 14:19:18.000000000 +1000
>> +++ fix/l4test/src/ipc.c 2008-09-23 14:20:59.000000000 +1000
>> @@ -81,7 +81,11 @@
>>
>> /* Magic numbers for checking things */
>> #define MAGIC_LABEL1 0xdead
>> -static const L4_ThreadId_t NONEXISTANT_TID = { 0x13371401UL };
>> +static const L4_ThreadId_t NONEXISTANT_TID = {
>> + .global.X.thread_no = 0x13371401UL >> 14,
>> + .global.X.version = 0x13371401UL & ((1 << 14) - 1)
>> +};
>> +
>>
>> static L4_ThreadId_t main_thread;
>> static L4_ThreadId_t other_thread;
>>
>> _______________________________________________
>> Developer mailing list
>> Developer at okl4.org
>> https://lists.okl4.org/mailman/listinfo/developer
>
>
More information about the Developer
mailing list