[okl4-developer] eas creation

Jamie Lennox jamielennox at gmail.com
Thu Jan 10 16:20:07 EST 2008


Hi,

Are we able to start and boot EASs from within iguana apps. I can't see
why not however i create an eas and then try to start it with
thread_start and everything seems to work fine however the threads are
never started (or appear not to be). There are examples in the
thread_tests file but none of these actually start a thread in the eas
and the multithread example uses SConstruct to create the thread, is
this the correct way?

relevant code: 

    L4_KernelInterfacePage_t *kip = L4_GetKernelInterface(); 
    kip_area = L4_FpageLog2((uintptr_t) kip, L4_KipAreaSizeLog2(kip)); 
    utcb_area = L4_FpageLog2(0x0, 16); 

    if (L4_UtcbAreaSizeLog2(kip) != 0)
        utcb = 0; 

---

L4_ThreadId_t 
create_task(void *ip, void *sp)
{
    L4_ThreadId_t ret = L4_nilthread; 
    thread_ref_t tid_ref = 0;
    eas_ref_t eas; 
    if ((eas = eas_create(kip_area, utcb_area, NULL)) == 0)
    {
        printf("EAS Creation Failure\n"); 
        return L4_nilthread;
    }

    printf("utcb = %p\n", utcb); 
    if (L4_IsThreadEqual((ret = eas_create_thread(eas, L4_Myself(),
L4_Myself(), utcb)), L4_nilthread))
    {
        printf("EAS Thread Creation Failure\n"); 
        return L4_nilthread; 
    }

    if ((tid_ref = thread_id(ret)) == 0)
    {
        printf("Thread lookup Failure\n"); 
        return L4_nilthread; 
    }

    thread_start(tid_ref, (uintptr_t) ip, (uintptr_t) sp);
    return ret; 
}

---

The tasks do a printf as soon as they're started. The threads seem to be
created and no errors are produced. using kdb and q i get: 

[255]: (roottask) (IRQ 00)
[240]: (vtimer)
[239]: (kdb_poll)
[200]: (ig_namin) (event)
[100]: (vserial) (deviceco) p_host p_server p_client
idle : idle

p_server & p_client were create with the above, however i then try to
IPC to the threads and get nothing.

Any idea whats going on?

Jamie




More information about the Developer mailing list