From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fa528,5375130a5c9be658 X-Google-Attributes: gidfa528,public X-Google-ArrivalTime: 2002-10-01 05:18:07 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed-east.nntpserver.com!nntpserver.com!newshosting.com!news-xfer1.atl.newshosting.com!uunet!dca.uu.net!ash.uu.net!news.compaq.com!news.cpqcorp.net!53ab2750!not-for-mail Newsgroups: comp.unix.tru64 Subject: Re: Current process & other key kernel global symbols References: <0S2m9.330918$216.13951392@bin4.nnrp.aus1.giganews.com> From: duane@hunch.zk3.dec.com (Andrew Duane USG) Message-ID: <8vgm9.7$PG2.331808@news.cpqcorp.net> Date: Tue, 01 Oct 2002 12:25:40 GMT NNTP-Posting-Host: 16.141.0.43 X-Complaints-To: abuse@Compaq.com X-Trace: news.cpqcorp.net 1033475140 16.141.0.43 (Tue, 01 Oct 2002 05:25:40 PDT) NNTP-Posting-Date: Tue, 01 Oct 2002 05:25:40 PDT Organization: Compaq, part of the new hp Xref: archiver1.google.com comp.unix.tru64:8757 In article <0S2m9.330918$216.13951392@bin4.nnrp.aus1.giganews.com> "Earl Lakia" writes: >Is there a global symbol that a kernel writer could pick up to get the >current process's PID or p_proc? I tried getpid() but it crashes >by driver (not calling when in ISR, but the read & write entries >of the driver). > >Is there a good way to get a description of all of the global >symbols available? > >Also how about the current clock tick? Well, for starters you would have to mention which version of the OS you are using. Things like that change. Which brings me to my next point. Although it is possible to get things like the "current process' PID", the definition of current process is at best vague at certain points in the kernel. If you are servicing a system call or some other such thing, then the current process is pretty well defined. If you are in an ISR, the current process means little to you. Segue into my next next point. Because such things change frequently, we do not document them to avoid having compatibility problems with drivers. The interfaces and variables we document are "guaranteed". Those we don't aren't. And as for "all the global symbols", there are thousands. 99.9% of them mean nothing to anyone except some small piece of code. If you'd like to contact me offline at one of my email addresses below, I'd be happy to lend a little more guidance. -- Andrew L. Duane (JOT-7) duane@zk3.dec.com HP/Compaq Corporation Andrew.Duane@compaq.com 110 Spit Brook Road Andrew.Duane@hp.com M/S ZKO3-3/U14 Nashua, NH 03062-2698 (603)-884-1294