changed suffix of all functions from '_s' to '_r'; see also ChangeLog
1998-07-14 Martin Baulig <martin@home-of-linux.org> * sysdeps/stub/*.c: changed suffix of all functions from '_s' to '_r'; see also ChangeLog entry from Jun 6.
This commit is contained in:
committed by
Martin Baulig
parent
2c8ae09776
commit
b991ecaf9a
@@ -24,5 +24,5 @@
|
||||
/* Closes pipe to gtop server. */
|
||||
|
||||
void
|
||||
glibtop_close (glibtop *server)
|
||||
glibtop_close_l (glibtop *server)
|
||||
{ }
|
||||
|
@@ -25,7 +25,7 @@
|
||||
/* Provides information about cpu usage. */
|
||||
|
||||
void
|
||||
glibtop_get_cpu_r (glibtop *server, glibtop_cpu *buf)
|
||||
glibtop_get_cpu_s (glibtop *server, glibtop_cpu *buf)
|
||||
{
|
||||
memset (buf, 0, sizeof (glibtop_cpu));
|
||||
}
|
||||
|
46
sysdeps/stub/glibtop_server.h
Normal file
46
sysdeps/stub/glibtop_server.h
Normal file
@@ -0,0 +1,46 @@
|
||||
/* $Id$ */
|
||||
|
||||
/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
|
||||
This file is part of the Gnome Top Library.
|
||||
Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
|
||||
|
||||
The Gnome Top Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
The Gnome Top Library 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
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with the GNU C Library; see the file COPYING.LIB. If not,
|
||||
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#ifndef __GLIBTOP_SERVER_H__
|
||||
#define __GLIBTOP_SERVER_H__
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
#define GLIBTOP_SUID_CPU 0
|
||||
#define GLIBTOP_SUID_MEM 0
|
||||
#define GLIBTOP_SUID_SWAP 0
|
||||
#define GLIBTOP_SUID_UPTIME 0
|
||||
#define GLIBTOP_SUID_LOADAVG 0
|
||||
#define GLIBTOP_SUID_SHM_LIMITS 0
|
||||
#define GLIBTOP_SUID_MSG_LIMITS 0
|
||||
#define GLIBTOP_SUID_SEM_LIMITS 0
|
||||
#define GLIBTOP_SUID_PROCLIST 0
|
||||
#define GLIBTOP_SUID_PROC_STATE 0
|
||||
#define GLIBTOP_SUID_PROC_UID 0
|
||||
#define GLIBTOP_SUID_PROC_MEM 0
|
||||
#define GLIBTOP_SUID_PROC_TIME 0
|
||||
#define GLIBTOP_SUID_PROC_SIGNAL 0
|
||||
#define GLIBTOP_SUID_PROC_KERNEL 0
|
||||
#define GLIBTOP_SUID_PROC_SEGMENT 0
|
||||
|
||||
__END_DECLS
|
||||
|
||||
#endif
|
@@ -26,14 +26,16 @@ static glibtop _glibtop_global_server;
|
||||
glibtop *glibtop_global_server = NULL;
|
||||
|
||||
glibtop *
|
||||
glibtop_init_r (glibtop **server)
|
||||
glibtop_init_r (glibtop **server, const unsigned long features,
|
||||
const unsigned flags)
|
||||
{
|
||||
if (*server != NULL)
|
||||
return *server;
|
||||
|
||||
if (glibtop_global_server == NULL) {
|
||||
glibtop_global_server = &_glibtop_global_server;
|
||||
glibtop_open (glibtop_global_server, "glibtop");
|
||||
glibtop_open_r (glibtop_global_server, "glibtop",
|
||||
features, flags);
|
||||
}
|
||||
|
||||
return *server = glibtop_global_server;
|
||||
|
@@ -25,7 +25,7 @@
|
||||
/* Provides load averange. */
|
||||
|
||||
void
|
||||
glibtop_get_loadavg_r (glibtop *server, glibtop_loadavg *buf)
|
||||
glibtop_get_loadavg_s (glibtop *server, glibtop_loadavg *buf)
|
||||
{
|
||||
memset (buf, 0, sizeof (glibtop_loadavg));
|
||||
}
|
||||
|
@@ -25,7 +25,7 @@
|
||||
/* Provides information about memory usage. */
|
||||
|
||||
void
|
||||
glibtop_get_mem_r (glibtop *server, glibtop_mem *buf)
|
||||
glibtop_get_mem_s (glibtop *server, glibtop_mem *buf)
|
||||
{
|
||||
memset (buf, 0, sizeof (glibtop_mem));
|
||||
}
|
||||
|
@@ -24,7 +24,7 @@
|
||||
/* Provides information about sysv ipc limits. */
|
||||
|
||||
void
|
||||
glibtop_get_msg_limits_r (glibtop *server, glibtop_msg_limits *buf)
|
||||
glibtop_get_msg_limits_s (glibtop *server, glibtop_msg_limits *buf)
|
||||
{
|
||||
memset (buf, 0, sizeof (glibtop_msg_limits));
|
||||
}
|
||||
|
@@ -24,7 +24,8 @@
|
||||
/* Opens pipe to gtop server. Returns 0 on success and -1 on error. */
|
||||
|
||||
void
|
||||
glibtop_open (glibtop *server, const char *program_name)
|
||||
glibtop_open_r (glibtop *server, const char *program_name,
|
||||
const unsigned long features, const unsigned flags)
|
||||
{
|
||||
memset (server, 0, sizeof (glibtop));
|
||||
server->name = program_name;
|
||||
|
@@ -25,8 +25,8 @@
|
||||
/* Provides detailed information about a process. */
|
||||
|
||||
void
|
||||
glibtop_get_proc_kernel_r (glibtop *server, glibtop_proc_kernel *buf,
|
||||
pid_t pid)
|
||||
glibtop_get_proc_kernel_s (glibtop *server, glibtop_proc_kernel *buf,
|
||||
pid_t pid)
|
||||
{
|
||||
memset (buf, 0, sizeof (glibtop_proc_kernel));
|
||||
}
|
||||
|
@@ -32,7 +32,7 @@
|
||||
* each buf->size big. The total size is stored in buf->total. */
|
||||
|
||||
unsigned *
|
||||
glibtop_get_proclist_r (glibtop *server, glibtop_proclist *buf)
|
||||
glibtop_get_proclist_s (glibtop *server, glibtop_proclist *buf)
|
||||
{
|
||||
memset (buf, 0, sizeof (glibtop_proclist));
|
||||
return NULL;
|
||||
|
@@ -25,8 +25,8 @@
|
||||
/* Provides detailed information about a process. */
|
||||
|
||||
void
|
||||
glibtop_get_proc_mem_r (glibtop *server, glibtop_proc_mem *buf,
|
||||
pid_t pid)
|
||||
glibtop_get_proc_mem_s (glibtop *server, glibtop_proc_mem *buf,
|
||||
pid_t pid)
|
||||
{
|
||||
memset (buf, 0, sizeof (glibtop_proc_mem));
|
||||
}
|
||||
|
@@ -25,8 +25,8 @@
|
||||
/* Provides detailed information about a process. */
|
||||
|
||||
void
|
||||
glibtop_get_proc_segment_r (glibtop *server, glibtop_proc_segment *buf,
|
||||
pid_t pid)
|
||||
glibtop_get_proc_segment_s (glibtop *server, glibtop_proc_segment *buf,
|
||||
pid_t pid)
|
||||
{
|
||||
memset (buf, 0, sizeof (glibtop_proc_segment));
|
||||
}
|
||||
|
@@ -25,7 +25,7 @@
|
||||
/* Provides detailed information about a process. */
|
||||
|
||||
void
|
||||
glibtop_get_proc_signal_r (glibtop *server, glibtop_proc_signal *buf,
|
||||
glibtop_get_proc_signal_s (glibtop *server, glibtop_proc_signal *buf,
|
||||
pid_t pid)
|
||||
{
|
||||
memset (buf, 0, sizeof (glibtop_proc_signal));
|
||||
|
@@ -25,8 +25,8 @@
|
||||
/* Provides detailed information about a process. */
|
||||
|
||||
void
|
||||
glibtop_get_proc_state_r (glibtop *server, glibtop_proc_state *buf,
|
||||
pid_t pid)
|
||||
glibtop_get_proc_state_s (glibtop *server, glibtop_proc_state *buf,
|
||||
pid_t pid)
|
||||
{
|
||||
memset (buf, 0, sizeof (glibtop_proc_state));
|
||||
}
|
||||
|
@@ -25,8 +25,8 @@
|
||||
/* Provides detailed information about a process. */
|
||||
|
||||
void
|
||||
glibtop_get_proc_time_r (glibtop *server, glibtop_proc_time *buf,
|
||||
pid_t pid)
|
||||
glibtop_get_proc_time_s (glibtop *server, glibtop_proc_time *buf,
|
||||
pid_t pid)
|
||||
{
|
||||
memset (buf, 0, sizeof (glibtop_proc_time));
|
||||
}
|
||||
|
@@ -25,8 +25,8 @@
|
||||
/* Provides detailed information about a process. */
|
||||
|
||||
void
|
||||
glibtop_get_proc_uid_r (glibtop *server, glibtop_proc_uid *buf,
|
||||
pid_t pid)
|
||||
glibtop_get_proc_uid_s (glibtop *server, glibtop_proc_uid *buf,
|
||||
pid_t pid)
|
||||
{
|
||||
memset (buf, 0, sizeof (glibtop_proc_uid));
|
||||
}
|
||||
|
@@ -24,7 +24,7 @@
|
||||
/* Provides information about sysv sem limits. */
|
||||
|
||||
void
|
||||
glibtop_get_sem_limits_r (glibtop *server, glibtop_sem_limits *buf)
|
||||
glibtop_get_sem_limits_s (glibtop *server, glibtop_sem_limits *buf)
|
||||
{
|
||||
memset (buf, 0, sizeof (glibtop_sem_limits));
|
||||
}
|
||||
|
@@ -24,7 +24,7 @@
|
||||
/* Provides information about sysv ipc limits. */
|
||||
|
||||
void
|
||||
glibtop_get_shm_limits_r (glibtop *server, glibtop_shm_limits *buf)
|
||||
glibtop_get_shm_limits_s (glibtop *server, glibtop_shm_limits *buf)
|
||||
{
|
||||
memset (buf, 0, sizeof (glibtop_shm_limits));
|
||||
}
|
||||
|
@@ -25,7 +25,7 @@
|
||||
/* Provides information about swap usage. */
|
||||
|
||||
void
|
||||
glibtop_get_swap_r (glibtop *server, glibtop_swap *buf)
|
||||
glibtop_get_swap_s (glibtop *server, glibtop_swap *buf)
|
||||
{
|
||||
memset (buf, 0, sizeof (glibtop_swap));
|
||||
}
|
||||
|
@@ -25,7 +25,7 @@
|
||||
/* Provides uptime and idle time. */
|
||||
|
||||
void
|
||||
glibtop_get_uptime_r (glibtop *server, glibtop_uptime *buf)
|
||||
glibtop_get_uptime_s (glibtop *server, glibtop_uptime *buf)
|
||||
{
|
||||
memset (buf, 0, sizeof (glibtop_uptime));
|
||||
}
|
||||
|
Reference in New Issue
Block a user