Changed client <-> server interface to make less system calls.

1998-06-18  Martin Baulig  <baulig@taurus.uni-trier.de>

	* lib/{command, write, read}.c: Changed client <-> server
	interface to make less system calls.

	* src/daemon/main.c: Changed server side of interface.

	* include/glibtop/command.h (struct _glibtop_response): New
	structure to return data from the server to the client.
This commit is contained in:
Martin Baulig
1998-06-18 10:22:39 +00:00
committed by Martin Baulig
parent d9e6288b7a
commit 2de9ea5c7d
8 changed files with 203 additions and 235 deletions

View File

@@ -50,13 +50,29 @@ __BEGIN_DECLS
#define GLIBTOP_MAX_CMND 18
typedef struct _glibtop_command glibtop_command;
#define _GLIBTOP_PARAM_SIZE 16
typedef struct _glibtop_command glibtop_command;
typedef struct _glibtop_response glibtop_response;
struct _glibtop_command
{
glibtop server;
unsigned command;
size_t size;
glibtop server;
unsigned command;
size_t size, data_size;
char parameter [_GLIBTOP_PARAM_SIZE];
};
union _glibtop_response_union
{
glibtop_union data;
glibtop_sysdeps sysdeps;
};
struct _glibtop_response
{
size_t data_size;
union _glibtop_response_union u;
};
#define glibtop_call(p1, p2, p3, p4) glibtop_call_r(glibtop_global_server, p1, p2, p3, p4)