diff options
author | Martin Baulig <baulig@taurus.uni-trier.de> | 1998-06-18 10:22:39 +0000 |
---|---|---|
committer | Martin Baulig <martin@src.gnome.org> | 1998-06-18 10:22:39 +0000 |
commit | 2de9ea5c7d316930fe49ba8a53803487f39bf282 (patch) | |
tree | bb49bd22cee21c9ecdaf19cffb434a3e2adcf3f6 /include | |
parent | d9e6288b7a6583a4f3a8dafeeb1225146b2c2927 (diff) | |
download | libgtop-2de9ea5c7d316930fe49ba8a53803487f39bf282.tar.gz |
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.
Diffstat (limited to 'include')
-rw-r--r-- | include/glibtop/command.h | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/include/glibtop/command.h b/include/glibtop/command.h index 8314699f..259bdec0 100644 --- a/include/glibtop/command.h +++ b/include/glibtop/command.h @@ -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) |