[okl4-developer] L4_Send and L4_Wait
Jorge Torres
jorge.torres.maldonado at gmail.com
Mon Nov 5 17:37:08 EST 2007
Hi,
If you are using iguana you can try creating your threads with the
thread_create_simple function which receives priority as it's third
argument, what are the priorities shown at KDB?
Cheers,
Jorge
On 11/5/07, Choi, SuGil <sooguri at etri.re.kr> wrote:
>
> A thread is created by calling function "kernel_thread()".
>
> I think the thread created as above is different from L4 thread.
>
> Three client threads are created by calling "kernel thread()".
>
> ---------- client thread -------- ---------- server
> thread -----------
>
> printf(" before L4_Send "); while(1)
> {
> L4_send(server thread ID);
> L4_Wait(&client)
>
> printf(" after L4_Send ");
> printf(" message from client was received ");
>
>
> function_A();
>
> }
>
> ---------- client thread -------- ---------- server
> thread -----------
>
>
>
> server thread is L4 thread.
>
>
>
> When first client thread sends message to server and function_A never
> returns, the other two threads
>
>
>
> don't have the chance of running.
>
>
>
> You pointed that this problem might be due to the priority of threads.
>
>
>
> The priority of server thread is 200.
>
>
>
> In order to run the client threads and server thread concurrently, the
> priority of client threads should be 200.
>
>
>
> How can I set the priority of the client thread?
>
>
> -----?? ???-----
> *From:* "Hal Ashburner" <hala at ok-labs.com>
> *From Date:* 2007-11-05 ?? 1:45:10
> *To:* "Choi, SuGil" <sooguri at etri.re.kr>
> *Cc:* "developer" <developer at okl4.org>
> *Subject:* RE: Re: [okl4-developer] L4_Send and L4_Wait
>
>
>
>
> On Fri, 2007-11-02 at 17:01 +0900, Choi, SuGil wrote:
> >
> > Thanks for your help.
> >
> > The client thread is created in wombat linux kernel.
> >
> > How can I find out the priority of the client thread?
>
> Break into the kernel by issuing "Ctrl + K" in the console to get to the
> L4 kernel debugger.
> "?" will show you all the options, the one you want is "q"
> which lists the current threads.
> The L4 threads in the linux kernel are "L_syscall" and "L_timer"
>
>
> > In addition, is the thread created in wombat kernel L4 thread?
>
> What precisely do you mean when you say "thread created"
> What is the code you are using to create a thread?
>
>
>
> > SuGil.
> >
> > -----?? ???-----
> > From: "Hal Ashburner" <hala at ok-labs.com>
> > From Date: 2007-11-02 ?? 4:02:47
> > To: "Choi, SuGil" <sooguri at etri.re.kr>
> > Cc: "developer at okl4.org" <developer at okl4.org>
> > Subject: Re: [okl4-developer] L4_Send and L4_Wait
> >
> >
> >
> >
> > On Fri, 2007-11-02 at 15:38 +0900, Choi, SuGil wrote:
> > > Hi,
> > >
> > >
> > >
> > > I have difficulty in testing client server program.
> > >
> > >
> >
> > <snip>
> >
> > >
> > > When the function_A never returns (infinite loop), L4_Send is
> > blocking
> > > indefinitely
> > >
> > >
> >
> > >
> > > I want that the client thread can run as long as the sent message
> > is
> > > received by the server
> > >
> > >
> > >
> > > even if the function_A never returns. Could you please tell me what
> > I
> > > have to do more.
> > >
> >
> > >
> > Hi SuGil.
> > Are the two threads the same priority?
> > The behaviour you are seeing would be consistent with the thread
> > running
> > function_A being of a higher priority than the sending thread.
> >
> > Hope this helps.
> >
> > --
> > Kind regards,
> > Hal Ashburner
> >
> >
> >
> >
> >
> --
> Kind regards,
> Hal Ashburner
>
>
> _______________________________________________
> 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/20071105/58c953e0/attachment-0001.htm
More information about the Developer
mailing list