Subject: re: COMPAT_IRIX and /dev/kmem emulation
To: None <eeh@netbsd.org>
From: matthew green <mrg@eterna.com.au>
List: tech-kern
Date: 03/15/2002 03:18: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;
   |         
see here:
   |         (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?


when it re-reads it will get built again.  see above.