extern.h revision 219972
1/*-
2 * Copyright (c) 1991, 1993, 1994
3 *	The Regents of the University of California.  All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright
9 *    notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright
11 *    notice, this list of conditions and the following disclaimer in the
12 *    documentation and/or other materials provided with the distribution.
13 * 4. Neither the name of the University nor the names of its contributors
14 *    may be used to endorse or promote products derived from this software
15 *    without specific prior written permission.
16 *
17 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
18 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20 * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
21 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 *
29 *	@(#)extern.h	8.3 (Berkeley) 4/2/94
30 * $FreeBSD: head/bin/ps/extern.h 219972 2011-03-24 20:15:42Z trasz $
31 */
32
33struct kinfo;
34struct nlist;
35struct var;
36struct varent;
37
38extern fixpt_t ccpu;
39extern int cflag, eval, fscale, nlistread, rawcpu;
40extern unsigned long mempages;
41extern time_t now;
42extern int showthreads, sumrusage, termwidth, totwidth;
43extern STAILQ_HEAD(velisthead, varent) varlist;
44
45__BEGIN_DECLS
46void	 arguments(KINFO *, VARENT *);
47void	 command(KINFO *, VARENT *);
48void	 cputime(KINFO *, VARENT *);
49int	 donlist(void);
50void	 elapsed(KINFO *, VARENT *);
51void	 elapseds(KINFO *, VARENT *);
52void	 emulname(KINFO *, VARENT *);
53VARENT	*find_varentry(VAR *);
54const	 char *fmt_argv(char **, char *, size_t);
55double	 getpcpu(const KINFO *);
56void	 kvar(KINFO *, VARENT *);
57void	 label(KINFO *, VARENT *);
58void	 loginclass(KINFO *, VARENT *);
59void	 logname(KINFO *, VARENT *);
60void	 longtname(KINFO *, VARENT *);
61void	 lstarted(KINFO *, VARENT *);
62void	 maxrss(KINFO *, VARENT *);
63void	 lockname(KINFO *, VARENT *);
64void	 mwchan(KINFO *, VARENT *);
65void	 nwchan(KINFO *, VARENT *);
66void	 pagein(KINFO *, VARENT *);
67void	 parsefmt(const char *, int);
68void	 pcpu(KINFO *, VARENT *);
69void	 pmem(KINFO *, VARENT *);
70void	 pri(KINFO *, VARENT *);
71void	 printheader(void);
72void	 priorityr(KINFO *, VARENT *);
73void	 rgroupname(KINFO *, VARENT *);
74void	 runame(KINFO *, VARENT *);
75void	 rvar(KINFO *, VARENT *);
76int	 s_comm(KINFO *);
77int	 s_cputime(KINFO *);
78int	 s_label(KINFO *);
79int	 s_loginclass(KINFO *);
80int	 s_logname(KINFO *);
81int	 s_rgroupname(KINFO *);
82int	 s_runame(KINFO *);
83int	 s_systime(KINFO *);
84int	 s_uname(KINFO *);
85int	 s_usertime(KINFO *);
86void	 showkey(void);
87void	 started(KINFO *, VARENT *);
88void	 state(KINFO *, VARENT *);
89void	 systime(KINFO *, VARENT *);
90void	 tdev(KINFO *, VARENT *);
91void	 tdnam(KINFO *, VARENT *);
92void	 tname(KINFO *, VARENT *);
93void	 ucomm(KINFO *, VARENT *);
94void	 uname(KINFO *, VARENT *);
95void	 upr(KINFO *, VARENT *);
96void	 usertime(KINFO *, VARENT *);
97void	 vsize(KINFO *, VARENT *);
98void	 wchan(KINFO *, VARENT *);
99__END_DECLS
100