[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

BOUNCE rtl@rtlinux.org: Approval required: Non-member submission from [Oliver Finsinger <Oliver25.F@gmx.de>] (fwd)



>From owner-rtl Thu May  3 09:37:13 2001
Received: from mx0.gmx.net (mx0.gmx.net [213.165.64.100])
	by hq.fsmlabs.com (8.11.2/8.11.2) with SMTP id f43FbCJ17062
	for <rtl@fsmlabs.com>; Thu, 3 May 2001 09:37:13 -0600
Received: (qmail 1643 invoked by uid 0); 3 May 2001 15:33:07 -0000
Date: Thu, 3 May 2001 17:33:05 +0200 (MEST)
From: Oliver Finsinger <Oliver25.F@gmx.de>
To: rtl@fsmlabs.com
MIME-Version: 1.0
References: <A3A5582AC3AFD448A7C0BD2DB7EFDC5F1143AE@BTR-COM1.btr-auto.aust.com>
Subject: Re: [rtl] putting threads to sleep
X-Priority: 3 (Normal)
X-Authenticated-Sender: #0000983105@gmx.net
X-Authenticated-IP: [141.59.40.161]
Message-ID: <15514.988903985@www17.gmx.net>
X-Mailer: WWW-Mail 1.5 (Global Message Exchange)
X-Flags: 0001
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit

> Hi all,
> 
> I've got a problem I hope someone can help me with.  I'm trying to put a
> thread to sleep but I don't want to tie up the system using usleep() or
> nanosleep(). 


This is not a good idea. with the sleep-functions your thread is still
active.
Try to use the   suspend()-  and   wakeup()-functions.
See the manuals of rtlinux. you can create a thread a thread.
make him periodic.
suspend and wakeup the thread 
and at the end you delete him.


> I've tried using pthread_make_periodic_np configured as a
> one shot timer (ie. it needs to repeat several times but for different
> time intervals) but it doesn't seem to work
> Any help would be much appreciated
> Thanks
> Karl Rentsch
> 
> -- [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/
> 

-- 
GMX - Die Kommunikationsplattform im Internet.
http://www.gmx.net