From: Dirk Grunwald <grunwald () foobar ! cs ! colorado ! edu>
To: tru64-unix-managers
Subject: is it possible to mmap /dev/kmem or /dev/mem?
Date: Wed, 21 Jan 1998 18:17:04 +0000 [thread overview]
Message-ID: <96078654410957.tru64-unix-managers.marc@archive.invalid> (raw)
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
reply other threads:[~1998-01-21 18:17 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox