Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
att
GitHub Repository: att/ast
Path: blob/master/src/cmd/std/psslib.h
1808 views
1
/***********************************************************************
2
* *
3
* This software is part of the ast package *
4
* Copyright (c) 1989-2011 AT&T Intellectual Property *
5
* and is licensed under the *
6
* Eclipse Public License, Version 1.0 *
7
* by AT&T Intellectual Property *
8
* *
9
* A copy of the License is available at *
10
* http://www.eclipse.org/org/documents/epl-v10.html *
11
* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
12
* *
13
* Information and Software Systems Research *
14
* AT&T Research *
15
* Florham Park NJ *
16
* *
17
* Glenn Fowler <[email protected]> *
18
* *
19
***********************************************************************/
20
#pragma prototyped
21
/*
22
* Glenn Fowler
23
* AT&T Research
24
*
25
* process status stream private interface
26
*/
27
28
#ifndef _PSSLIB_H
29
#define _PSSLIB_H 1
30
31
#define _PSS_PRIVATE_ \
32
Pssdisc_t* disc; /* user discipline */ \
33
Vmalloc_t* vm; /* vm region */ \
34
Pssent_t* ent; /* last entry */ \
35
Pss_id_t pid; /* scan pid */ \
36
unsigned long boot; /* boot time */ \
37
Dt_t* ttybyname; /* tty by name hash */ \
38
Dt_t* ttybydev; /* tty by dev hash */ \
39
Dtdisc_t ttybynamedisc; /* tty by name disc */ \
40
Dtdisc_t ttybydevdisc; /* tty by dev disc */ \
41
void* data; /* private data */ \
42
int hz; /* current CLK_TCK */ \
43
int ttyscan; /* -1:bad 0:init 2:scanned */ \
44
char buf[1024]; /* work and return value buffer */
45
46
#include <ast.h>
47
#include <ast_dir.h>
48
#include <dt.h>
49
#include <ctype.h>
50
#include <dirent.h>
51
#include <error.h>
52
#include <ls.h>
53
#include <vmalloc.h>
54
55
#if __CYGWIN__
56
57
#include <ast_windows.h>
58
#include <sys/cygwin.h>
59
60
#endif
61
62
#include <pss.h>
63
64
#include "FEATURE/procfs"
65
66
typedef struct Tty_s /* tty hash */
67
{
68
Dtlink_t byname; /* by name dict link */
69
Dtlink_t bydev; /* by dev dict link */
70
Pss_dev_t dev; /* dev */
71
char name[1]; /* base name */
72
} Tty_t;
73
74
#if !_mem_st_rdev_stat
75
#define st_rdev st_dev
76
#endif
77
78
extern Pssmeth_t* _pss_method;
79
extern Pssmeth_t* _pss_ps;
80
81
#endif
82
83