Fri Dec 19 15:16:15 2008 UTC ()
Fix ADDUPROF macro definition, to correctly use its argument.

ok by christos.


(njoly)
diff -r1.46 -r1.47 src/sys/sys/resourcevar.h

cvs diff -r1.46 -r1.47 src/sys/sys/resourcevar.h (expand / switch to unified diff)

--- src/sys/sys/resourcevar.h 2008/10/11 13:40:58 1.46
+++ src/sys/sys/resourcevar.h 2008/12/19 15:16:15 1.47
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: resourcevar.h,v 1.46 2008/10/11 13:40:58 pooka Exp $ */ 1/* $NetBSD: resourcevar.h,v 1.47 2008/12/19 15:16:15 njoly Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 1991, 1993 4 * Copyright (c) 1991, 1993
5 * The Regents of the University of California. All rights reserved. 5 * The Regents of the University of California. All rights reserved.
6 * 6 *
7 * Redistribution and use in source and binary forms, with or without 7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions 8 * modification, are permitted provided that the following conditions
9 * are met: 9 * are met:
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer. 11 * notice, this list of conditions and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright 12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the 13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution. 14 * documentation and/or other materials provided with the distribution.
@@ -73,33 +73,33 @@ struct pstats { @@ -73,33 +73,33 @@ struct pstats {
73 */ 73 */
74struct plimit { 74struct plimit {
75 struct rlimit pl_rlimit[RLIM_NLIMITS]; 75 struct rlimit pl_rlimit[RLIM_NLIMITS];
76 char *pl_corename; 76 char *pl_corename;
77#define PL_SHAREMOD 0x01 /* modifications are shared */ 77#define PL_SHAREMOD 0x01 /* modifications are shared */
78#define PL_WRITEABLE 0x02 /* private to this process */ 78#define PL_WRITEABLE 0x02 /* private to this process */
79 int pl_flags; 79 int pl_flags;
80 int pl_refcnt; /* number of references */ 80 int pl_refcnt; /* number of references */
81 kmutex_t pl_lock; /* mutex for pl_refcnt */ 81 kmutex_t pl_lock; /* mutex for pl_refcnt */
82 struct plimit *pl_sv_limit; /* saved when PL_WRITEABLE set */ 82 struct plimit *pl_sv_limit; /* saved when PL_WRITEABLE set */
83}; 83};
84 84
85/* add user profiling from AST XXXSMP */ 85/* add user profiling from AST XXXSMP */
86#define ADDUPROF(p) \ 86#define ADDUPROF(l) \
87 do { \ 87 do { \
88 struct proc *_p = l->l_proc; \ 88 struct proc *_p = (l)->l_proc; \
89 addupc_task(l, \ 89 addupc_task((l), \
90 (_p)->p_stats->p_prof.pr_addr, \ 90 _p->p_stats->p_prof.pr_addr, \
91 (_p)->p_stats->p_prof.pr_ticks); \ 91 _p->p_stats->p_prof.pr_ticks); \
92 (_p)->p_stats->p_prof.pr_ticks = 0; \ 92 _p->p_stats->p_prof.pr_ticks = 0; \
93 } while (/* CONSTCOND */ 0) 93 } while (/* CONSTCOND */ 0)
94 94
95#ifdef _KERNEL 95#ifdef _KERNEL
96extern char defcorename[]; 96extern char defcorename[];
97 97
98extern int security_setidcore_dump; 98extern int security_setidcore_dump;
99extern char security_setidcore_path[]; 99extern char security_setidcore_path[];
100extern uid_t security_setidcore_owner; 100extern uid_t security_setidcore_owner;
101extern gid_t security_setidcore_group; 101extern gid_t security_setidcore_group;
102extern mode_t security_setidcore_mode; 102extern mode_t security_setidcore_mode;
103 103
104void addupc_intr(struct lwp *, u_long); 104void addupc_intr(struct lwp *, u_long);
105void addupc_task(struct lwp *, u_long, u_int); 105void addupc_task(struct lwp *, u_long, u_int);