diff options
| author | Laurent Bercot <ska-skaware@skarnet.org> | 2021-06-29 00:16:10 +0000 |
|---|---|---|
| committer | Laurent Bercot <ska@appnovation.com> | 2021-06-29 00:16:10 +0000 |
| commit | 4c1d58b509c83ff788fe1ad6b5bdd1073977622c (patch) | |
| tree | 2788fa5a734ec40a0a3690846189090ff629ecba /src/include | |
| parent | 4b057ce275a2761656b62a3fa1e57ebf934c3af8 (diff) | |
| download | s6-rc-4c1d58b509c83ff788fe1ad6b5bdd1073977622c.tar.gz | |
Some work on the db representation
Signed-off-by: Laurent Bercot <ska@appnovation.com>
Diffstat (limited to 'src/include')
| -rw-r--r-- | src/include/s6-rc/db.h | 106 |
1 files changed, 0 insertions, 106 deletions
diff --git a/src/include/s6-rc/db.h b/src/include/s6-rc/db.h deleted file mode 100644 index 8953a49..0000000 --- a/src/include/s6-rc/db.h +++ /dev/null @@ -1,106 +0,0 @@ -/* ISC license. */ - -#ifndef S6RC_SERVICE_H -#define S6RC_SERVICE_H - -#include <stdint.h> - - - /* Service types and db representation in memory */ - -typedef enum s6rc_stype_e s6rc_stype_t, *s6rc_stype_t_ref ; -enum s6rc_stype_e -{ - S6RC_STYPE_LONGRUN, - S6RC_STYPE_ONESHOT, - S6RC_STYPE_EXTERNAL, - S6RC_STYPE_BUNDLE, - S6RC_STYPE_VIRTUAL, - S6RC_STYPE_PHAIL -} ; - -typedef struct s6rc_sid_s s6rc_sid_t, *s6rc_sid_t_ref ; -struct s6rc_sid_s -{ - uint32_t i ; - char const *param ; - s6rc_stype_t stype ; -} ; - -typedef struct s6rc_common_s s6rc_common_t, *s6rc_common_t_ref ; -struct s6rc_common_s -{ - uint32_t name ; - uint32_t deps[2] ; - uint32_t ndeps[2] ; - uint32_t flag_essential : 1 ; - uint32_t flags : 31 ; -} ; - -typedef struct s6rc_atomic_s s6rc_atomic_t, *s6rc_atomic_t_ref ; -struct s6rc_atomic_s -{ - s6rc_common_t common ; - uint32_t timeout[2] ; -} ; - -typedef struct s6rc_oneshot_s s6rc_oneshot_t, *s6rc_oneshot_t_ref ; -struct s6rc_oneshot_s -{ - s6rc_atomic_t satomic ; - uint32_t argc[2] ; - uint32_t argv[2] ; -} ; - -typedef struct s6rc_longrun_s s6rc_longrun_t, *s6rc_longrun_t_ref ; -struct s6rc_longrun_s -{ - s6rc_atomic_t satomic ; - s6rc_sid_t consumer ; - uint32_t nproducers ; - uint32_t producers ; -} ; - -typedef struct s6rc_external_s s6rc_external_t, *s6rc_external_t_ref ; -struct s6rc_external_s -{ - s6rc_common_t common ; -} ; - -typedef struct s6rc_bundle_s s6rc_bundle_t, *s6rc_bundle_t_ref ; -struct s6rc_bundle_s -{ - s6rc_common_t common ; - uint32_t ncontents ; - uint32_t contents ; -} ; - -typedef struct s6rc_deptype_s s6rc_deptype_t, *s6rc_deptype_t_ref ; -struct s6rc_deptype_s -{ - uint8_t passive : 1 ; - uint8_t soft : 1 ; - uint8_t loose : 1 ; -} ; - -typedef struct s6rc_db_s s6rc_db_t, *s6rc_db_t_ref ; -struct s6rc_db_s -{ - uint32_t ntotal ; - uint32_t n[STYPE_PHAIL << 1] ; - uint32_t storagelen ; - s6rc_longrun_t *longruns ; - s6rc_oneshot_t *oneshots ; - s6rc_external_t *externals ; - s6rc_bundle_t *bundles ; - s6rc_bundle_t *virtuals ; - s6rc_sid_t *deps[2] ; - s6rc_deptype_t *deptypes[2] ; - s6rc_sid_t *producers ; - char const **argvs ; - char *storage ; -} ; - -extern s6rc_common_t const *s6rc_service_common (s6rc_db_t const *, s6rc_sid_t const *) ; - -#endif |
