<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: how to get current process in hpux11 dlkm in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-get-current-process-in-hpux11-dlkm/m-p/5185646#M662783</link>
    <description>from user level you have pstat_getproc funcs&lt;BR /&gt;else in the kernel:&lt;BR /&gt;proc_pstat_idx_lookup_hold&lt;BR /&gt;proc_pstat_lookup_next_hold&lt;BR /&gt;&lt;BR /&gt;- don(t forget to call proc_release()&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Thu, 09 Jul 2009 05:24:04 GMT</pubDate>
    <dc:creator>Laurent Menase</dc:creator>
    <dc:date>2009-07-09T05:24:04Z</dc:date>
    <item>
      <title>how to get current process in hpux11 dlkm</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-get-current-process-in-hpux11-dlkm/m-p/5185636#M662773</link>
      <description>I'm developing dlkm now on HP-UX 11.11i &lt;BR /&gt;in my kernel module i want to get the current process  ,such as linux's macro "current"&lt;BR /&gt;how to get current process in hpux11 dlkm?</description>
      <pubDate>Tue, 07 Jul 2009 07:20:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-get-current-process-in-hpux11-dlkm/m-p/5185636#M662773</guid>
      <dc:creator>kaijile</dc:creator>
      <dc:date>2009-07-07T07:20:02Z</dc:date>
    </item>
    <item>
      <title>Re: how to get current process in hpux11 dlkm</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-get-current-process-in-hpux11-dlkm/m-p/5185637#M662774</link>
      <description>What would be the current process if you have a N way machine?  The one that is doing the I/O?&lt;BR /&gt;&lt;BR /&gt;You want to supply more info on what you are trying to do.</description>
      <pubDate>Tue, 07 Jul 2009 07:52:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-get-current-process-in-hpux11-dlkm/m-p/5185637#M662774</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2009-07-07T07:52:38Z</dc:date>
    </item>
    <item>
      <title>Re: how to get current process in hpux11 dlkm</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-get-current-process-in-hpux11-dlkm/m-p/5185638#M662775</link>
      <description>on 11.23:&lt;BR /&gt;thread id:&lt;BR /&gt; kt_tid(u.u_kthreadp);   &lt;BR /&gt;&lt;BR /&gt;process id&lt;BR /&gt; p_pid(u.uprocp);&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;don't forget to include sys/user.h&lt;BR /&gt;</description>
      <pubDate>Tue, 07 Jul 2009 10:30:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-get-current-process-in-hpux11-dlkm/m-p/5185638#M662775</guid>
      <dc:creator>Laurent Menase</dc:creator>
      <dc:date>2009-07-07T10:30:32Z</dc:date>
    </item>
    <item>
      <title>Re: how to get current process in hpux11 dlkm</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-get-current-process-in-hpux11-dlkm/m-p/5185639#M662776</link>
      <description>I want to get the current process's struct proc and struct kthread descriptor,how to get their  pointer?&lt;BR /&gt;&lt;BR /&gt;how to traversing all struct proc and struct kthread descriptors in kernel ?&lt;BR /&gt;&lt;BR /&gt;kt_tid is ok ,but when i used p_pid(u.uprocp);&lt;BR /&gt;have compile error :&lt;BR /&gt;cc: "test.c", line 187: error 1588: "uprocp" undefined&lt;BR /&gt;&lt;BR /&gt;where is the variabe u defined?&lt;BR /&gt;&lt;BR /&gt;bash-4.0# uname -a&lt;BR /&gt;HP-UX rp5470 B.11.11 U 9000/800 142444635 unlimited-user license&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 07 Jul 2009 13:44:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-get-current-process-in-hpux11-dlkm/m-p/5185639#M662776</guid>
      <dc:creator>kaijile</dc:creator>
      <dc:date>2009-07-07T13:44:38Z</dc:date>
    </item>
    <item>
      <title>Re: how to get current process in hpux11 dlkm</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-get-current-process-in-hpux11-dlkm/m-p/5185640#M662777</link>
      <description>u.u_procp&lt;BR /&gt;sorry for the typo</description>
      <pubDate>Tue, 07 Jul 2009 13:50:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-get-current-process-in-hpux11-dlkm/m-p/5185640#M662777</guid>
      <dc:creator>Laurent Menase</dc:creator>
      <dc:date>2009-07-07T13:50:35Z</dc:date>
    </item>
    <item>
      <title>Re: how to get current process in hpux11 dlkm</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-get-current-process-in-hpux11-dlkm/m-p/5185641#M662778</link>
      <description>it is in &lt;BR /&gt;/usr/include/machine/sys/user.h I believe.&lt;BR /&gt;it is a struct user defined in&lt;BR /&gt;/usr/include/sys/user.h</description>
      <pubDate>Tue, 07 Jul 2009 13:51:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-get-current-process-in-hpux11-dlkm/m-p/5185641#M662778</guid>
      <dc:creator>Laurent Menase</dc:creator>
      <dc:date>2009-07-07T13:51:59Z</dc:date>
    </item>
    <item>
      <title>Re: how to get current process in hpux11 dlkm</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-get-current-process-in-hpux11-dlkm/m-p/5185642#M662779</link>
      <description>kt_tid(u.u_kthreadp);&lt;BR /&gt;&lt;BR /&gt;p_pid(u.uprocp);&lt;BR /&gt;&lt;BR /&gt;I can't find these two functions in the &lt;BR /&gt;HP-UX 11i v1 Driver Development Guide and &lt;BR /&gt;HP-UX 11i v1 Driver Development Reference Guide&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;which Documentation has  mentioned p_pid() and &lt;BR /&gt;kt_tid() function?&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 08 Jul 2009 01:05:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-get-current-process-in-hpux11-dlkm/m-p/5185642#M662779</guid>
      <dc:creator>kaijile</dc:creator>
      <dc:date>2009-07-08T01:05:47Z</dc:date>
    </item>
    <item>
      <title>Re: how to get current process in hpux11 dlkm</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-get-current-process-in-hpux11-dlkm/m-p/5185643#M662780</link>
      <description>they are defined in kthread_iface.h and proc_iface.h&lt;BR /&gt;Else I don't know. may be in 11i v2 dd ref guide</description>
      <pubDate>Wed, 08 Jul 2009 05:39:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-get-current-process-in-hpux11-dlkm/m-p/5185643#M662780</guid>
      <dc:creator>Laurent Menase</dc:creator>
      <dc:date>2009-07-08T05:39:42Z</dc:date>
    </item>
    <item>
      <title>Re: how to get current process in hpux11 dlkm</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-get-current-process-in-hpux11-dlkm/m-p/5185644#M662781</link>
      <description>but what are you trying to make exactly?&lt;BR /&gt;&lt;BR /&gt;a kill calls logger?&lt;BR /&gt;</description>
      <pubDate>Wed, 08 Jul 2009 08:03:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-get-current-process-in-hpux11-dlkm/m-p/5185644#M662781</guid>
      <dc:creator>Laurent Menase</dc:creator>
      <dc:date>2009-07-08T08:03:22Z</dc:date>
    </item>
    <item>
      <title>Re: how to get current process in hpux11 dlkm</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-get-current-process-in-hpux11-dlkm/m-p/5185645#M662782</link>
      <description>i want  to traversing all struct proc and struct kthread descriptors in kernel,&lt;BR /&gt;but i can not find suitable kernel API function to do it.&lt;BR /&gt;in HP-UX 11i v1 Driver Development Guide and&lt;BR /&gt;HP-UX 11i v1 Driver Development Reference Guide&lt;BR /&gt;i can not find related information</description>
      <pubDate>Thu, 09 Jul 2009 01:02:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-get-current-process-in-hpux11-dlkm/m-p/5185645#M662782</guid>
      <dc:creator>kaijile</dc:creator>
      <dc:date>2009-07-09T01:02:05Z</dc:date>
    </item>
    <item>
      <title>Re: how to get current process in hpux11 dlkm</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-get-current-process-in-hpux11-dlkm/m-p/5185646#M662783</link>
      <description>from user level you have pstat_getproc funcs&lt;BR /&gt;else in the kernel:&lt;BR /&gt;proc_pstat_idx_lookup_hold&lt;BR /&gt;proc_pstat_lookup_next_hold&lt;BR /&gt;&lt;BR /&gt;- don(t forget to call proc_release()&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 09 Jul 2009 05:24:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-get-current-process-in-hpux11-dlkm/m-p/5185646#M662783</guid>
      <dc:creator>Laurent Menase</dc:creator>
      <dc:date>2009-07-09T05:24:04Z</dc:date>
    </item>
    <item>
      <title>Re: how to get current process in hpux11 dlkm</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-get-current-process-in-hpux11-dlkm/m-p/5185647#M662784</link>
      <description>then once you have the proc you can look at its threads with&lt;BR /&gt;kt=p_firstthreadp(p)&lt;BR /&gt;then you can use kt_nextp(kt)&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Then release the hold.&lt;BR /&gt;</description>
      <pubDate>Thu, 09 Jul 2009 05:27:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-get-current-process-in-hpux11-dlkm/m-p/5185647#M662784</guid>
      <dc:creator>Laurent Menase</dc:creator>
      <dc:date>2009-07-09T05:27:24Z</dc:date>
    </item>
    <item>
      <title>Re: how to get current process in hpux11 dlkm</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-get-current-process-in-hpux11-dlkm/m-p/5185648#M662785</link>
      <description>be carefull that walking all procs and threads can take time.  So be carefull to schedyield()&lt;BR /&gt;2 process walk.</description>
      <pubDate>Thu, 09 Jul 2009 05:29:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-get-current-process-in-hpux11-dlkm/m-p/5185648#M662785</guid>
      <dc:creator>Laurent Menase</dc:creator>
      <dc:date>2009-07-09T05:29:03Z</dc:date>
    </item>
    <item>
      <title>Re: how to get current process in hpux11 dlkm</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-get-current-process-in-hpux11-dlkm/m-p/5185649#M662786</link>
      <description>Is proc_list have lock?&lt;BR /&gt;what's the name of proc_list's lock?&lt;BR /&gt;how to use proc_list's lock ?</description>
      <pubDate>Tue, 14 Jul 2009 02:04:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-get-current-process-in-hpux11-dlkm/m-p/5185649#M662786</guid>
      <dc:creator>kaijile</dc:creator>
      <dc:date>2009-07-14T02:04:54Z</dc:date>
    </item>
    <item>
      <title>Re: how to get current process in hpux11 dlkm</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-get-current-process-in-hpux11-dlkm/m-p/5185650#M662787</link>
      <description>proc_pstat_idx_lookup_hold&lt;BR /&gt;proc_pstat_lookup_next_hold&lt;BR /&gt;&lt;BR /&gt;- don(t forget to call proc_release()&lt;BR /&gt;&lt;BR /&gt;the hold and release is for that</description>
      <pubDate>Tue, 14 Jul 2009 19:15:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-get-current-process-in-hpux11-dlkm/m-p/5185650#M662787</guid>
      <dc:creator>Laurent Menase</dc:creator>
      <dc:date>2009-07-14T19:15:46Z</dc:date>
    </item>
    <item>
      <title>Re: how to get current process in hpux11 dlkm</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-get-current-process-in-hpux11-dlkm/m-p/5185651#M662788</link>
      <description>In kernel, i have the pid of the process,&lt;BR /&gt;how to get absolute path name of the executable file?</description>
      <pubDate>Wed, 15 Jul 2009 07:02:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-get-current-process-in-hpux11-dlkm/m-p/5185651#M662788</guid>
      <dc:creator>kaijile</dc:creator>
      <dc:date>2009-07-15T07:02:42Z</dc:date>
    </item>
    <item>
      <title>Re: how to get current process in hpux11 dlkm</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-get-current-process-in-hpux11-dlkm/m-p/5185652#M662789</link>
      <description>In fact I don't see any easy way</description>
      <pubDate>Wed, 15 Jul 2009 10:29:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-get-current-process-in-hpux11-dlkm/m-p/5185652#M662789</guid>
      <dc:creator>Laurent Menase</dc:creator>
      <dc:date>2009-07-15T10:29:26Z</dc:date>
    </item>
    <item>
      <title>Re: how to get current process in hpux11 dlkm</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-get-current-process-in-hpux11-dlkm/m-p/5185653#M662790</link>
      <description>&amp;gt;how to get absolute path name of the executable file?&lt;BR /&gt;&lt;BR /&gt;Here is how to use pstat(2) calls to get it outside the kernel, not sure if that helps:&lt;BR /&gt;&lt;A href="http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1350198" target="_blank"&gt;http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1350198&lt;/A&gt;</description>
      <pubDate>Wed, 15 Jul 2009 10:51:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-get-current-process-in-hpux11-dlkm/m-p/5185653#M662790</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2009-07-15T10:51:49Z</dc:date>
    </item>
    <item>
      <title>Re: how to get current process in hpux11 dlkm</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-get-current-process-in-hpux11-dlkm/m-p/5185654#M662791</link>
      <description>in kernel no public API permit to find it.&lt;BR /&gt;</description>
      <pubDate>Wed, 15 Jul 2009 11:44:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-get-current-process-in-hpux11-dlkm/m-p/5185654#M662791</guid>
      <dc:creator>Laurent Menase</dc:creator>
      <dc:date>2009-07-15T11:44:18Z</dc:date>
    </item>
    <item>
      <title>Re: how to get current process in hpux11 dlkm</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-get-current-process-in-hpux11-dlkm/m-p/5185655#M662792</link>
      <description>what are the functions pstat_stub32() and pstat()  return value?&lt;BR /&gt;&lt;BR /&gt;q4&amp;gt; disassemble pstat_stub32&lt;BR /&gt;Dump of assembler code for function pstat_stub32:&lt;BR /&gt;0x8b5678 &lt;PSTAT_STUB32&gt;:        ldw 4(%r26),%ret0&lt;BR /&gt;0x8b567c &lt;PSTAT_STUB32&gt;:    extrw,s %ret0,0,1,%ret0&lt;BR /&gt;0x8b5680 &lt;PSTAT_STUB32&gt;:    stw %ret0,0(%r26)&lt;BR /&gt;0x8b5684 &lt;PSTAT_STUB32&gt;:    stw %r0,8(%r26)&lt;BR /&gt;0x8b5688 &lt;PSTAT_STUB32&gt;:   stw %r0,0x10(%r26)&lt;BR /&gt;0x8b568c &lt;PSTAT_STUB32&gt;:   stw %r0,0x18(%r26)&lt;BR /&gt;0x8b5690 &lt;PSTAT_STUB32&gt;:   ldw 0x24(%r26),%ret0&lt;BR /&gt;0x8b5694 &lt;PSTAT_STUB32&gt;:   extrw,s %ret0,0,1,%ret0&lt;BR /&gt;0x8b5698 &lt;PSTAT_STUB32&gt;:   ldil L'0x9a000,%r31&lt;BR /&gt;0x8b569c &lt;PSTAT_STUB32&gt;:   be 0x358(%sr4,%r31)&lt;BR /&gt;0x8b56a0 &lt;PSTAT_STUB32&gt;:   stw %ret0,0x20(%r26)&lt;BR /&gt;End of assembler dump.&lt;BR /&gt;q4&amp;gt; disassemble pstat|more&lt;BR /&gt;Dump of assembler code for function pstat:&lt;BR /&gt;0x9a358 &lt;PSTAT&gt;:        std %rp,-0x10(%sp)&lt;BR /&gt;0x9a35c &lt;PSTAT&gt;:    ldo 0x80(%sp),%sp&lt;BR /&gt;0x9a360 &lt;PSTAT&gt;:    mfia %r26&lt;BR /&gt;0x9a364 &lt;PSTAT&gt;:    addil L'-0x800,%r26,%r1&lt;BR /&gt;0x9a368 &lt;PSTAT&gt;:   ldo 0x7f8(%r1),%r26&lt;BR /&gt;0x9a36c &lt;PSTAT&gt;:   addil L'-0x10e000,%dp,%r1&lt;BR /&gt;0x9a370 &lt;PSTAT&gt;:   ldd 0x10(%r1),%r25&lt;BR /&gt;0x9a374 &lt;PSTAT&gt;:   ldd 0x440(%r25),%r24&lt;BR /&gt;&lt;/PSTAT&gt;&lt;/PSTAT&gt;&lt;/PSTAT&gt;&lt;/PSTAT&gt;&lt;/PSTAT&gt;&lt;/PSTAT&gt;&lt;/PSTAT&gt;&lt;/PSTAT&gt;&lt;/PSTAT_STUB32&gt;&lt;/PSTAT_STUB32&gt;&lt;/PSTAT_STUB32&gt;&lt;/PSTAT_STUB32&gt;&lt;/PSTAT_STUB32&gt;&lt;/PSTAT_STUB32&gt;&lt;/PSTAT_STUB32&gt;&lt;/PSTAT_STUB32&gt;&lt;/PSTAT_STUB32&gt;&lt;/PSTAT_STUB32&gt;&lt;/PSTAT_STUB32&gt;</description>
      <pubDate>Wed, 15 Jul 2009 12:46:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-get-current-process-in-hpux11-dlkm/m-p/5185655#M662792</guid>
      <dc:creator>kaijile</dc:creator>
      <dc:date>2009-07-15T12:46:48Z</dc:date>
    </item>
  </channel>
</rss>

