[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
BOUNCE rtl@rtlinux.org: Approval required: Non-member submissionfrom [root <agn@city.dk>] (fwd)
- To: rtl@rtlinux.org
- Subject: BOUNCE rtl@rtlinux.org: Approval required: Non-member submissionfrom [root <agn@city.dk>] (fwd)
- From: Der Herr Hofrat <der.herr@hofr.at>
- Date: Mon, 21 May 2001 12:17:53 +0200 (CEST)
>From owner-rtl Mon May 21 02:56:21 2001
Received: from kalman.iau.dtu.dk (kalman.iau.dtu.dk [192.38.66.22])
by hq.fsmlabs.com (8.11.2/8.11.2) with ESMTP id f4L8uKr18217
for <rtl@fsmlabs.com>; Mon, 21 May 2001 02:56:20 -0600
Received: from city.dk (IDENT:root@xterm39 [192.38.66.79])
by kalman.iau.dtu.dk (8.9.3/8.9.3) with ESMTP id KAA05997
for <rtl@fsmlabs.com>; Mon, 21 May 2001 10:51:11 +0200
Sender: root@kalman.iau.dtu.dk
Message-ID: <3B08D746.B33D71C0@city.dk>
Date: Mon, 21 May 2001 10:52:23 +0200
From: root <agn@city.dk>
X-Mailer: Mozilla 4.76 [en] (X11; U; Linux 2.4.1-rtl i686)
X-Accept-Language: en
MIME-Version: 1.0
To: rtl@fsmlabs.com
Subject: Re: [rtl] general question about nanosleep, usleep, semaphores and
otherwaits.
References: <200105201210.f4KCAjr14672@kanga.hofr.at>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Thats right
In fact I had the ansvar but I just did'nt get the first time. I thougt
that nanosleep etc was busy wait because of the "crash".
This is a mail recived from Michael Barabanov. Se the mail index
Ok, nanosleep/usleep in init_module should cause Linux to hang.
The "Linux" RT-thread is suspended, and it means the whole of Linux.
Also, you can not use them in an interrupt handler, since it is
unpredictable which task is suspended this way.
If you use these functions in an RT-thread, they will not hang the system.
You can make an RT-thread block on a semaphore, and post it from the
interrupt handler.
Michael.
> > Hi all
> > This is a general question.
> >
> > When using nanosleep, sem_wait, usleep etc. in RT - threds these
> > funktion is performed as sleep. it meens the thread is suspended until
> > the wakeuptime ore call to sem_post from other thred. thats fine.
> >
> > But what happens withe these funktions is called from a fifo handler or
> > in init_module. I know that nanosleep is busy wait, but what about fx.
>
> nanosleep is not busy wait, it calls clock_nanosleep wich sets up the timer
> marks it selfe suspended and then calls rtl_schedul().
>
> hofrat
>
> ----- End of forwarded message from owner-rtl@fsmlabs.com -----
> -- [rtl] ---
> To unsubscribe:
> echo "unsubscribe rtl" | mail majordomo@rtlinux.org OR
> echo "unsubscribe rtl <Your_email>" | mail majordomo@rtlinux.org
> --
> For more information on Real-Time Linux see:
> http://www.rtlinux.org/rtlinux/