From: kenm@u.washington.edu (Ken Marquess)
Subject: getting time and pid in kernel?
Date: 1996/01/31 [thread overview]
Message-ID: <4eo9vc$41@nntp5.u.washington.edu> (raw)
Executive summary: I'm having problems determining the process id and
time of day from a kernel process, specifically a device driver top half.
If you know how to do either, I'd like to talk to you!
Details: I'm trying to port/rewrite a driver (from AIX) for a pseudodevice.
The pseudodevice forms a pair of devices (kind of like tty/pty pairs) that
are used to support a remote tape drive (i.e. there is a local pseudo
device that emulates a tape drive, and sends the data to/from a real
drive on another system. In the device drivers, I write a trace table
for diagnostic purposes, which includes the time of day and pid.
Aix supplied a getpid() that worked in kernel mode, and a global variable
called 'time' that was the current time. When I call getpid() in
DEC OSF/Digital Unix (3.2.C if it matters) the system abends.
sys/time.h has some lines that imply there ought to be a global
variable called time, but I haven't figured out the right loader
flags or something - I never get a value other than 0.
I've looked through the kernel source a little, without finding any good
examples to copy.
If anyone can help, I'd appreciate it. The software will be available for
free when completed.
Ken Marquess, University of Washington, kenm@u.washington.edu
next reply other threads:[~1996-01-31 5:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
1996-01-31 5:00 Ken Marquess [this message]
1996-02-06 5:00 ` getting time and pid in kernel? Jeffrey M. Denham
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