Subject: Re: COMPAT_IRIX and /dev/kmem emulation
To: None <manu@netbsd.org, simonb@wasabisystems.com>
From: None <eeh@netbsd.org>
List: tech-kern
Date: 03/14/2002 16:14:09
| Let me rephrase, I have not been clear enough:
| xload calls sysmp() to get load_avg address. NetBSD's kernel returns
| &irix_load_avg, which is a dummy int that won't be used anywhere.
|
| Then I have an IRIX kmem driver, that xload will open instead of the
| real /dev/kmem, and it would do something like this on read operations
|         
| if (offset == &irix_load_avg) {
|         struct irix_load_avg ilavg;
|         
|         (build ilavg from native load avg)
|         copyout(buf, &ilavg, len);
| }
|
| Hence there is no need to update, the data is build on the fly when
| xload tries to read it.

So what happens 1 second later when xload re-reads what it thinks
is a live kernel variable that never changes?

Eduardo