On Wed, Jul 05, 2000 at 04:43:34PM +0200, Ivan Martinez wrote:
> [EMAIL PROTECTED] wrote:
> >
> > On Tue, Jul 04, 2000 at 07:11:29PM +0200, Ivan Martinez wrote:
> > > Hello all
> > > I have a real time task which consists of an infinite loop with some
> > > code and a "pthread_wait_np" inside it. If it's running and I call
> > > "pthread_suspend_np", does the task stop inmediatly or when it executes
> > > "pthread_wait_np" again?.
> > > Can't anybody help me with my other problem about spin locks?.
> > > Thank you.
> >
> > On a uniprocessor that target of a suspend willl not run again until
> > it is woken up.
> > On a multiprocessor, it is possible that the thread is running during the
> > suspend and then it will only get suspended when the remote scheduler
> > runs.
>
> Mmmm... It seems I didn't explain myself very well, sorry. The real time
> task is something like:
>
> while (1) do
> {
> sentence1();
> sentence2();
> sentence3();
> pthread_wait_np();
> }
>
> Imagine that the execution is in "sentence1" and other task suspends
> this one with "pthread_suspend_np". Will this task stop right there or
> it will execute "sentence1", "sentence2", "sentence3" and stop in
> "pthread_wait_np"?. Many thanks.
On a uniprocessor the task will not resume.
That is
Task 1
s1
s2
-----------<preempted or interrupted>
Task 2 calls
pthread_suspend_np(thread1)
Thread 1 will not continue until someone does pthread_wakeup_np
or sends it another signal.
>
> >
> > What was your spinlock problem?
>
> Paolo put me in the right direction, thank you.
>
> >
> > > --
> > > Ivan Martinez (Rodriguez)
> > > BEng in Software Engineering - MEng student
> > > http://www.student.dtu.dk/~u990873
> > > "Got fabes?"
> > > -- [rtl] ---
> > > To unsubscribe:
> > > echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
> > > echo "unsubscribe rtl <Your_email>" | mail [EMAIL PROTECTED]
> > > ---
> > > For more information on Real-Time Linux see:
> > > http://www.rtlinux.org/rtlinux/
> >
> > --
> > ---------------------------------------------------------
> > Victor Yodaiken
> > FSMLabs: www.fsmlabs.com www.rtlinux.com
> > FSMLabs is a servicemark and a service of
> > VJY Associates L.L.C, New Mexico.
>
> --
> Ivan Martinez (Rodriguez)
> BEng in Software Engineering - MEng student
> http://www.student.dtu.dk/~u990873
> "Got fabes?"
--
---------------------------------------------------------
Victor Yodaiken
FSMLabs: www.fsmlabs.com www.rtlinux.com
FSMLabs is a servicemark and a service of
VJY Associates L.L.C, New Mexico.
-- [rtl] ---
To unsubscribe:
echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
echo "unsubscribe rtl <Your_email>" | mail [EMAIL PROTECTED]
---
For more information on Real-Time Linux see:
http://www.rtlinux.org/rtlinux/