[okl4-developer] eas creation
Jorge Torres
jorge.torres.maldonado at gmail.com
Thu Jan 10 16:42:18 EST 2008
Hi Jamie,
How are you trying to IPC, can you post your code?, are you sure you are not
making any deadlocks?, because if you want to do some sort of ping pong,
well deadlock could be a very common mistake,
Jorge
On Jan 10, 2008 12:20 AM, Jamie Lennox <jamielennox at gmail.com> wrote:
> 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
>
>
> _______________________________________________
> Developer mailing list
> Developer at okl4.org
> https://lists.okl4.org/mailman/listinfo/developer
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.okl4.org/pipermail/developer/attachments/20080110/a69cb9d7/attachment-0001.htm
More information about the Developer
mailing list