aboutsummaryrefslogtreecommitdiffstats
path: root/src/mds-base.h
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2014-05-20 04:32:00 +0200
committerMattias Andrée <maandree@operamail.com>2014-05-20 04:33:14 +0200
commit799e2d46923728ac670d7110f764868b82333a0b (patch)
treeff206e5bc62672ed31910e7ca52aed7b106618b1 /src/mds-base.h
parentmisc, mostly mds-base re-exec (diff)
downloadmds-799e2d46923728ac670d7110f764868b82333a0b.tar.gz
mds-799e2d46923728ac670d7110f764868b82333a0b.tar.bz2
mds-799e2d46923728ac670d7110f764868b82333a0b.tar.xz
Modify mds-server to use mds-base (some regression...)
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to '')
-rw-r--r--src/mds-base.h41
1 files changed, 30 insertions, 11 deletions
diff --git a/src/mds-base.h b/src/mds-base.h
index 28d7432..e92e73e 100644
--- a/src/mds-base.h
+++ b/src/mds-base.h
@@ -138,6 +138,16 @@ extern void received_terminate(int signo);
/**
* This function should be implemented by the actual server implementation
*
+ * This function will be invoked before `initialise_server` (if not re-exec:ing)
+ * or before `unmarshal_server` (if re-exec:ing)
+ *
+ * @return Non-zero on error
+ */
+extern int preinitialise_server(void);
+
+/**
+ * This function should be implemented by the actual server implementation
+ *
* This function should initialise the server,
* and it not invoked after a re-exec.
*
@@ -148,12 +158,24 @@ extern int initialise_server(void);
/**
* This function should be implemented by the actual server implementation
*
- * Unmarshal server implementation specific data and update the servers state accordingly
+ * This function will be invoked asgter `initialise_server` (if not re-exec:ing)
+ * or after `unmarshal_server` (if re-exec:ing)
*
- * @param state_buf The marshalled data that as not been read already
- * @return Non-zero on error
+ * @return Non-zero on error
*/
-extern int unmarshal_server(char* state_buf);
+extern int postinitialise_server(void);
+
+/**
+ * This function should be implemented by the actual server implementation
+ *
+ * Calculate the number of bytes that will be stored by `marshal_server`
+ *
+ * On failure the program should `abort()` or exit by other means.
+ * However it should not be possible for this function to fail.
+ *
+ * @return The number of bytes that will be stored by `marshal_server`
+ */
+extern size_t marshal_server_size(void) __attribute__((pure));
/**
* This function should be implemented by the actual server implementation
@@ -168,14 +190,12 @@ extern int marshal_server(char* state_buf);
/**
* This function should be implemented by the actual server implementation
*
- * Calculate the number of bytes that will be stored by `marshal_server`
- *
- * On failure the program should `abort()` or exit by other means.
- * However it should not be possible for this function to fail.
+ * Unmarshal server implementation specific data and update the servers state accordingly
*
- * @return The number of bytes that will be stored by `marshal_server`
+ * @param state_buf The marshalled data that as not been read already
+ * @return Non-zero on error
*/
-extern size_t marshal_server_size(void);
+extern int unmarshal_server(char* state_buf);
/**
* This function should be implemented by the actual server implementation
@@ -187,7 +207,6 @@ extern size_t marshal_server_size(void);
*/
extern int reexec_failure_recover(void);
-
/**
* This function should be implemented by the actual server implementation
*