summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Wong <mark@2ndQuadrant.com>2020-04-10 18:02:17 -0700
committerMark Wong <mark@2ndQuadrant.com>2020-04-10 18:07:29 -0700
commit90902dfee8d8d1d36ecc64e6602c7b7f83d1d50f (patch)
tree3abcf37137f1db86d716d1e8752bfba4c8529442
parenta775ed65a5c986cc55d26ffcb700af21fffe1a91 (diff)
Force all machines to conform to updated get_process_info()
The changes that were previously restricted for Linux should be applied to all machines. There shouldn't be any reason that the updates can't be applied to some degree on all platform.
-rw-r--r--machine.h5
-rw-r--r--pg_top.c13
2 files changed, 2 insertions, 16 deletions
diff --git a/machine.h b/machine.h
index 69f7dde..e317152 100644
--- a/machine.h
+++ b/machine.h
@@ -112,13 +112,8 @@ struct process_select
/* routines defined by the machine dependent module */
int machine_init(struct statics *);
void get_system_info(struct system_info *);
-#ifdef __linux__
caddr_t get_process_info(struct system_info *, struct process_select *, int,
struct pg_conninfo_ctx *, int);
-#else
-caddr_t get_process_info(struct system_info *, struct process_select *, int,
- struct pg_conninfo_ctx *);
-#endif /* __linux__ */
char *format_header(char *);
#ifdef __linux__
char *format_next_io(caddr_t);
diff --git a/pg_top.c b/pg_top.c
index e75728a..f3530f5 100644
--- a/pg_top.c
+++ b/pg_top.c
@@ -185,13 +185,9 @@ do_display(struct pg_top_context *pgtctx)
if (pgtctx->mode_remote == 0)
{
get_system_info(&pgtctx->system_info);
-#ifdef __linux__
- processes = get_process_info(&pgtctx->system_info, &pgtctx->ps,
- pgtctx->order_index, &pgtctx->conninfo, pgtctx->mode);
-#else
processes = get_process_info(&pgtctx->system_info, &pgtctx->ps,
- pgtctx->order_index, &pgtctx->conninfo);
-#endif /* __linux__ */
+ pgtctx->order_index, &pgtctx->conninfo,
+ pgtctx->mode);
}
else
{
@@ -995,13 +991,8 @@ main(int argc, char *argv[])
if (pgtctx.mode_remote == 0)
{
get_system_info(&pgtctx.system_info);
-#ifdef __linux__
(void) get_process_info(&pgtctx.system_info, &pgtctx.ps, -1,
&pgtctx.conninfo, pgtctx.mode);
-#else
- (void) get_process_info(&pgtctx.system_info, &pgtctx.ps, -1,
- &pgtctx.conninfo);
-#endif /* __linux__ */
}
else
{