This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: Functions to consume CPU time in x86
- To: Cristiano Ligieri Pereira <cpereira at ics dot uci dot edu>, ecos-discuss at sourceware dot cygnus dot com
- Subject: Re: [ECOS] Functions to consume CPU time in x86
- From: "Lewin A.R.W. Edwards" <larwe at larwe dot com>
- Date: Wed, 28 Mar 2001 15:07:50 -0500
- References: <Pine.SOL.4.20.0103281020370.10015-100000@washoe.ics.uci.edu>
>And of course I want to be able to specify that I want to keep the CPU
>busy for specific X (mili/nano)seconds and not only keep it busy for some
>randon amount of time.
This is going to be close to impossible to achieve. The exact amount of
time will depend on:
* clock speed
* exact CPU vendor and model (and maybe microcode revision)
* L1 and L2 cache state
* alignment of code
* MMU state
* (potentially) other hardware tying up buses
You'll need to examine the instruction timing for your particular specific
hardware and write functions of your own methinks.
=== Lewin A.R.W. Edwards (Embedded Engineer)
Work: http://www.digi-frame.com/
Personal: http://www.zws.com/ and http://www.larwe.com/
"Und setzet ihr nicht das Leben ein,
Nie wird euch das Leben gewonnen sein."