From 4b3fcf149a7eed6f0fd544756ec3515c779da185 Mon Sep 17 00:00:00 2001 From: Martin Baulig Date: Fri, 7 Aug 1998 10:01:55 +0000 Subject: New fields `error_method', `sysdeps' and `required'. I added an improved 1998-08-07 Martin Baulig * glibtop.h (_glibtop): New fields `error_method', `sysdeps' and `required'. I added an improved error handling: the client can tell the libraries which fields are absolutely required for each features and if it fails to set one of them, this will create an error which is handled depending upon the `error_method'. * include/glibtop/open.h: Define some constants for `error_method'. * lib/sysdeps.c (glibtop_get_sysdeps_r): No longer actually call any sysdeps function, it now simply copies `server->sysdeps'. (_glibtop_init_hook_s): Added. List of functions to be called during `glibtop_init_s' set to `glibtop_init__s'. * include/glibtop/sysdeps.h (): Removed. (glibtop_init_func_t): New typedef. (_glibtop_init_hook_s): Added. * sysdeps/linux/*.c (glibtop_init__s): New functions. (glibtop_get_proc_*): Zero is now a valid pid. * sysdeps/kernel/*.c (glibtop_init__s): New functions. (glibtop_get_proc_*): Zero is now a valid pid. 1998-08-06 Martin Baulig --- include/glibtop/sysdeps.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'include/glibtop/sysdeps.h') diff --git a/include/glibtop/sysdeps.h b/include/glibtop/sysdeps.h index dce97d7c..e3b9551b 100644 --- a/include/glibtop/sysdeps.h +++ b/include/glibtop/sysdeps.h @@ -23,7 +23,6 @@ #define __GLIBTOP_SYSDEPS_H__ #include -#include __BEGIN_DECLS @@ -51,6 +50,9 @@ __BEGIN_DECLS #define GLIBTOP_SYSDEPS_ALL ((1 << GLIBTOP_MAX_SYSDEPS) - 1) +typedef void (*glibtop_init_func_t) (glibtop *); +extern glibtop_init_func_t _glibtop_init_hook_s []; + typedef struct _glibtop_sysdeps glibtop_sysdeps; struct _glibtop_sysdeps -- cgit v1.2.1