| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | /* $NetBSD: psinfo.d,v 1.4 2015/10/06 22:12:09 christos Exp $ */ | | 1 | /* $NetBSD: psinfo.d,v 1.5 2015/10/07 00:35:23 christos Exp $ */ |
2 | | | 2 | |
3 | /* | | 3 | /* |
4 | * CDDL HEADER START | | 4 | * CDDL HEADER START |
5 | * | | 5 | * |
6 | * The contents of this file are subject to the terms of the | | 6 | * The contents of this file are subject to the terms of the |
7 | * Common Development and Distribution License, Version 1.0 only | | 7 | * Common Development and Distribution License, Version 1.0 only |
8 | * (the "License"). You may not use this file except in compliance | | 8 | * (the "License"). You may not use this file except in compliance |
9 | * with the License. | | 9 | * with the License. |
10 | * | | 10 | * |
11 | * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE | | 11 | * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE |
12 | * or http://www.opensolaris.org/os/licensing. | | 12 | * or http://www.opensolaris.org/os/licensing. |
13 | * See the License for the specific language governing permissions | | 13 | * See the License for the specific language governing permissions |
14 | * and limitations under the License. | | 14 | * and limitations under the License. |
| @@ -77,23 +77,20 @@ typedef struct lwpsinfo { | | | @@ -77,23 +77,20 @@ typedef struct lwpsinfo { |
77 | | | 77 | |
78 | #pragma D binding "1.0" translator | | 78 | #pragma D binding "1.0" translator |
79 | translator lwpsinfo_t < struct lwp *T > { | | 79 | translator lwpsinfo_t < struct lwp *T > { |
80 | pr_lwpid = T->l_lid; | | 80 | pr_lwpid = T->l_lid; |
81 | pr_pri = T->l_priority; | | 81 | pr_pri = T->l_priority; |
82 | pr_flag = T->l_flag; | | 82 | pr_flag = T->l_flag; |
83 | pr_state = T->l_stat; | | 83 | pr_state = T->l_stat; |
84 | pr_sname = '?'; /* XXX */ | | 84 | pr_sname = '?'; /* XXX */ |
85 | pr_syscall = 0; /* XXX */ | | 85 | pr_syscall = 0; /* XXX */ |
86 | pr_addr = (uintptr_t)T; | | 86 | pr_addr = (uintptr_t)T; |
87 | pr_wchan = (uintptr_t)T->l_wchan; | | 87 | pr_wchan = (uintptr_t)T->l_wchan; |
88 | }; | | 88 | }; |
89 | | | 89 | |
90 | /* XXX: does not work with multprocessor, since it needs curcpu() */ | | 90 | inline psinfo_t *curpsinfo = xlate <psinfo_t *> (curthread->l_proc); |
91 | /* | | | |
92 | inline psinfo_t *curpsinfo = xlate <psinfo_t *> (curlwp->l_proc); | | | |
93 | #pragma D attributes Stable/Stable/Common curpsinfo | | 91 | #pragma D attributes Stable/Stable/Common curpsinfo |
94 | #pragma D binding "1.0" curpsinfo | | 92 | #pragma D binding "1.0" curpsinfo |
95 | | | 93 | |
96 | inline lwpsinfo_t *curlwpsinfo = xlate <lwpsinfo_t *> (curlwp); | | 94 | inline lwpsinfo_t *curlwpsinfo = xlate <lwpsinfo_t *> (curthread); |
97 | #pragma D attributes Stable/Stable/Common curlwpsinfo | | 95 | #pragma D attributes Stable/Stable/Common curlwpsinfo |
98 | #pragma D binding "1.0" curlwpsinfo | | 96 | #pragma D binding "1.0" curlwpsinfo |
99 | */ | | | |