summaryrefslogtreecommitdiff
path: root/procfs_pid.h
blob: 566c83eaf193098813fba0a284cee185157fbd61 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
/* procfs -- a translator for providing GNU/Linux compatible 
             proc pseudo-filesystem

   procfs_pid.h -- This is the header file of which contains defintions
                   for structure of directory with PID as the name and
                   structure of each file in this directory.
               
   Copyright (C) 2008, FSF.
   Written as a Summer of Code Project
   
   procfs is free software; you can redistribute it and/or
   modify it under the terms of the GNU General Public License as
   published by the Free Software Foundation; either version 2, or (at
   your option) any later version.

   procfs is distributed in the hope that it will be useful, but
   WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   General Public License for more details.

   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA. 
*/

#ifndef __PROCFS_PID_H__
#define __PROCFS_PID_H__

#include "procfs.h"

struct procfs_pid_files
{
  struct procfs_cwd *procfs_cwd;
  struct procfs_environ *procfs_environ;
  struct procfs_cpu *procfs_cpu;
  struct procfs_root *procfs_root;
  struct procfs_exe *procfs_exe;
  struct procfs_stat *_procfs_stat;
  struct procfs_statm *procfs_statm;
};

struct procfs_stat
{
  pid_t pid;
  char *comm;
  char *state;
  pid_t ppid;
  pid_t pgid;
  pid_t sid;
  int tty_nr;
  pid_t tty_pgrp;
  unsigned flags;	
  long unsigned minflt;
  long unsigned cminflt;
  long unsigned majflt;
  long unsigned cmajflt;
  jiffy_t utime;
  jiffy_t stime;
  jiffy_t cutime;
  jiffy_t cstime;
  long priority;
  long nice;
  long num_threads;
  long itrealvalue;
  long long unsigned starttime;
  long unsigned vsize;
  long rss;
  long unsigned rlim;
  long unsigned startcode;
  long unsigned endcode;
  long unsigned startstack;
  long unsigned kstkesp;
  long unsigned kstkeip;
  long unsigned signal;
  long unsigned blocked;
  long unsigned sigignore;
  long unsigned sigcatch;
  long unsigned wchan;
  long unsigned nswap;
  long unsigned cnswap;
  int exit_signal;
  int processor;
  unsigned rt_priority;
  unsigned policy;
  long long unsigned delayacct_blkio_ticks;
};

#endif