tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
* is it possible to mmap /dev/kmem or /dev/mem?
@ 1998-01-21 18:17 Dirk Grunwald
  0 siblings, 0 replies; only message in thread
From: Dirk Grunwald @ 1998-01-21 18:17 UTC (permalink / raw)
  To: tru64-unix-managers


Does anyone know if it's possible to mmap() /dev/mem or /dev/kmem?  My
experiments appear to indicate it's not, but the kernel source code
makes me think it should be possible (at least for /dev/mem).

I'm trying to emulate the 'hrtime' routine in Solaris. I need
inexpensive access to a timer. I want to mmap() the 'time' symbol from
/vmunix into a R/O page, and then atomically read the timer, much like
the gettimeofday() call does in the kernel.

I know about timing with the the RPCC instruction, but I'm doing this
on a small mulitprocessor, and thus want a single monotonically
non-decreasing timer. 

The alternate plan is to used interrupts to occasionally update a
global timer variable and then have the threads read that atomically.

Dirk Grunwald                 Assoc. Prof, Univ. of Colorado at Boulder

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1998-01-21 18:17 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1998-01-21 18:17 is it possible to mmap /dev/kmem or /dev/mem? Dirk Grunwald

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox