From: David van Moolenbroek Date: Mon, 5 Dec 2011 09:51:58 +0000 (+0100) Subject: SEF: default to endpoint-changing restart X-Git-Tag: v3.2.0~202 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/Bv9ARM.ch10.html?a=commitdiff_plain;h=2f622b3a51ec3935c464415a8a0d2bf67d7f4125;p=minix.git SEF: default to endpoint-changing restart --- 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 * *===========================================================================*/