From 2f622b3a51ec3935c464415a8a0d2bf67d7f4125 Mon Sep 17 00:00:00 2001 From: David van Moolenbroek Date: Mon, 5 Dec 2011 10:51:58 +0100 Subject: [PATCH] SEF: default to endpoint-changing restart --- common/include/minix/sef.h | 3 ++- lib/libsys/sef_init.c | 9 +++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/common/include/minix/sef.h b/common/include/minix/sef.h index d78b39553..f1bf1180b 100644 --- a/common/include/minix/sef.h +++ b/common/include/minix/sef.h @@ -48,6 +48,7 @@ _PROTOTYPE( int sef_cb_init_null, (int type, sef_init_info_t *info) ); _PROTOTYPE( int sef_cb_init_response_null, (message *m_ptr) ); _PROTOTYPE( int sef_cb_init_fail, (int type, sef_init_info_t *info) ); +_PROTOTYPE( int sef_cb_init_reset, (int type, sef_init_info_t *info) ); _PROTOTYPE( int sef_cb_init_crash, (int type, sef_init_info_t *info) ); _PROTOTYPE( int sef_cb_init_response_rs_reply, (message *m_ptr) ); @@ -59,7 +60,7 @@ _PROTOTYPE( int sef_cb_init_response_rs_reply, (message *m_ptr) ); #define SEF_CB_INIT_FRESH_DEFAULT sef_cb_init_null #define SEF_CB_INIT_LU_DEFAULT sef_cb_init_null -#define SEF_CB_INIT_RESTART_DEFAULT sef_cb_init_null +#define SEF_CB_INIT_RESTART_DEFAULT sef_cb_init_reset #define SEF_CB_INIT_RESPONSE_DEFAULT sef_cb_init_response_rs_reply /* Init types. */ diff --git a/lib/libsys/sef_init.c b/lib/libsys/sef_init.c index 783b04ad0..82ebf867c 100644 --- a/lib/libsys/sef_init.c +++ b/lib/libsys/sef_init.c @@ -181,6 +181,15 @@ PUBLIC int sef_cb_init_fail(int UNUSED(type), sef_init_info_t *UNUSED(info)) return ENOSYS; } +/*===========================================================================* + * sef_cb_init_reset * + *===========================================================================*/ +PUBLIC int sef_cb_init_reset(int UNUSED(type), sef_init_info_t *UNUSED(info)) +{ + /* Tell RS to reincarnate us, with no old resources, and a new endpoint. */ + return ERESTART; +} + /*===========================================================================* * sef_cb_init_crash * *===========================================================================*/ -- 2.44.0