From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <96078654410957.tru64-unix-managers.marc@archive.invalid> From: Dirk Grunwald Date: Wed, 21 Jan 1998 18:17:04 +0000 To: tru64-unix-managers Subject: is it possible to mmap /dev/kmem or /dev/mem? X-MARC-Message: https://marc.info/?l=tru64-unix-managers&m=96078654410957 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