Deleted Added
full compact
procstat_threads.c (174230) procstat_threads.c (176107)
1/*-
2 * Copyright (c) 2007 Robert N. M. Watson
3 * 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 unchanged lines hidden (view full) ---

18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 *
1/*-
2 * Copyright (c) 2007 Robert N. M. Watson
3 * 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 unchanged lines hidden (view full) ---

18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 *
26 * $FreeBSD: head/usr.bin/procstat/procstat_threads.c 174230 2007-12-03 21:21:15Z rwatson $
26 * $FreeBSD: head/usr.bin/procstat/procstat_threads.c 176107 2008-02-08 11:03:05Z dwmalone $
27 */
28
29#include <sys/types.h>
30#include <sys/sysctl.h>
31#include <sys/user.h>
32
33#include <err.h>
34#include <errno.h>
35#include <stdio.h>
36#include <stdlib.h>
37#include <string.h>
38
39#include "procstat.h"
40
41void
42procstat_threads(pid_t pid, struct kinfo_proc *kipp)
43{
44 struct kinfo_proc *kip;
27 */
28
29#include <sys/types.h>
30#include <sys/sysctl.h>
31#include <sys/user.h>
32
33#include <err.h>
34#include <errno.h>
35#include <stdio.h>
36#include <stdlib.h>
37#include <string.h>
38
39#include "procstat.h"
40
41void
42procstat_threads(pid_t pid, struct kinfo_proc *kipp)
43{
44 struct kinfo_proc *kip;
45 int error, i, name[4];
45 int error, name[4];
46 unsigned int i;
46 const char *str;
47 size_t len;
48
49 if (!hflag)
50 printf("%5s %6s %-16s %-16s %2s %4s %-7s %-9s\n", "PID",
51 "TID", "COMM", "TDNAME", "CPU", "PRI", "STATE", "WCHAN");
52
53 /*

--- 88 unchanged lines hidden ---
47 const char *str;
48 size_t len;
49
50 if (!hflag)
51 printf("%5s %6s %-16s %-16s %2s %4s %-7s %-9s\n", "PID",
52 "TID", "COMM", "TDNAME", "CPU", "PRI", "STATE", "WCHAN");
53
54 /*

--- 88 unchanged lines hidden ---