Add MKLIVEUPDATE and MKSTATECTL
This commit is contained in:
parent
86b5fa5102
commit
4ca68d42a0
9 changed files with 34 additions and 4 deletions
|
@ -231,5 +231,10 @@ _PROTOTYPE( void sef_cb_signal_handler_posix_default, (int signo) );
|
||||||
#define sef_signal_debug_begin sef_debug_begin
|
#define sef_signal_debug_begin sef_debug_begin
|
||||||
#define sef_signal_debug_end sef_debug_end
|
#define sef_signal_debug_end sef_debug_end
|
||||||
|
|
||||||
|
#if !defined(USE_LIVEUPDATE)
|
||||||
|
#undef INTERCEPT_SEF_LU_REQUESTS
|
||||||
|
#undef SEF_LU_DEBUG
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /* _SEF_H */
|
#endif /* _SEF_H */
|
||||||
|
|
||||||
|
|
|
@ -73,6 +73,14 @@ SRCS+= debug.c
|
||||||
CPPFLAGS+= -DUSE_SYSDEBUG
|
CPPFLAGS+= -DUSE_SYSDEBUG
|
||||||
.endif
|
.endif
|
||||||
|
|
||||||
|
.if ${USE_LIVEUPDATE} != "no"
|
||||||
|
CPPFLAGS+= -DUSE_UPDATE
|
||||||
|
.endif
|
||||||
|
|
||||||
|
.if ${USE_STATECTL} != "no"
|
||||||
|
CPPFLAGS+= -DUSE_STATECTL
|
||||||
|
.endif
|
||||||
|
|
||||||
# These come last, so the profiling buffer is at the end of the data segment
|
# These come last, so the profiling buffer is at the end of the data segment
|
||||||
SRCS+= profile.c do_sprofile.c
|
SRCS+= profile.c do_sprofile.c
|
||||||
|
|
||||||
|
|
|
@ -42,8 +42,6 @@
|
||||||
#define USE_PHYSCOPY 1 /* copy using physical addressing */
|
#define USE_PHYSCOPY 1 /* copy using physical addressing */
|
||||||
#define USE_MEMSET 1 /* write char to a given memory area */
|
#define USE_MEMSET 1 /* write char to a given memory area */
|
||||||
#define USE_RUNCTL 1 /* control stop flags of a process */
|
#define USE_RUNCTL 1 /* control stop flags of a process */
|
||||||
#define USE_UPDATE 1 /* update a process into another */
|
|
||||||
#define USE_STATECTL 1 /* let a process control its state */
|
|
||||||
|
|
||||||
/* Length of program names stored in the process table. This is only used
|
/* Length of program names stored in the process table. This is only used
|
||||||
* for the debugging dumps that can be generated with the IS server. The PM
|
* for the debugging dumps that can be generated with the IS server. The PM
|
||||||
|
|
|
@ -1,7 +1,12 @@
|
||||||
# Makefile for libdriver
|
# Makefile for libdriver
|
||||||
|
.include <bsd.own.mk>
|
||||||
|
|
||||||
LIB= driver
|
LIB= driver
|
||||||
|
|
||||||
SRCS= driver.c drvlib.c mq.c
|
SRCS= driver.c drvlib.c mq.c
|
||||||
|
|
||||||
|
.if ${USE_STATECTL} != "no"
|
||||||
|
CPPFLAGS+= -DUSE_STATECTL
|
||||||
|
.endif
|
||||||
|
|
||||||
.include <bsd.lib.mk>
|
.include <bsd.lib.mk>
|
||||||
|
|
|
@ -230,10 +230,12 @@ PUBLIC void driver_announce()
|
||||||
* For this reason, there may blocked callers when a driver restarts.
|
* For this reason, there may blocked callers when a driver restarts.
|
||||||
* Ask the kernel to unblock them (if any).
|
* Ask the kernel to unblock them (if any).
|
||||||
*/
|
*/
|
||||||
|
#if USE_STATECTL
|
||||||
r = sys_statectl(SYS_STATE_CLEAR_IPC_REFS);
|
r = sys_statectl(SYS_STATE_CLEAR_IPC_REFS);
|
||||||
if (r != OK) {
|
if (r != OK) {
|
||||||
panic("driver_announce: sys_statectl failed: %d\n", r);
|
panic("driver_announce: sys_statectl failed: %d\n", r);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Publish a driver up event. */
|
/* Publish a driver up event. */
|
||||||
r = ds_retrieve_label_name(label, getprocnr());
|
r = ds_retrieve_label_name(label, getprocnr());
|
||||||
|
|
|
@ -132,6 +132,10 @@ SRCS+= gcov.c \
|
||||||
CPPFLAGS+= -DUSE_COVERAGE
|
CPPFLAGS+= -DUSE_COVERAGE
|
||||||
.endif
|
.endif
|
||||||
|
|
||||||
|
.if ${USE_LIVEUPDATE} != "no"
|
||||||
|
CPPFLAGS+= -DUSE_LIVEUPDATE
|
||||||
|
.endif
|
||||||
|
|
||||||
CPPFLAGS.sched_start.c+= -I${MINIXSRCDIR}
|
CPPFLAGS.sched_start.c+= -I${MINIXSRCDIR}
|
||||||
|
|
||||||
.if (${CC} == "gcc") || (${CC} == "clang")
|
.if (${CC} == "gcc") || (${CC} == "clang")
|
||||||
|
|
|
@ -60,6 +60,7 @@ PUBLIC void sef_startup()
|
||||||
sef_self_priv_flags = priv_flags;
|
sef_self_priv_flags = priv_flags;
|
||||||
old_endpoint = NONE;
|
old_endpoint = NONE;
|
||||||
|
|
||||||
|
#if USE_LIVEUPDATE
|
||||||
/* RS may wake up with the wrong endpoint, perfom the update in that case. */
|
/* RS may wake up with the wrong endpoint, perfom the update in that case. */
|
||||||
if((sef_self_priv_flags & ROOT_SYS_PROC) && sef_self_endpoint != RS_PROC_NR) {
|
if((sef_self_priv_flags & ROOT_SYS_PROC) && sef_self_endpoint != RS_PROC_NR) {
|
||||||
r = vm_update(RS_PROC_NR, sef_self_endpoint);
|
r = vm_update(RS_PROC_NR, sef_self_endpoint);
|
||||||
|
@ -70,6 +71,7 @@ PUBLIC void sef_startup()
|
||||||
old_endpoint = sef_self_endpoint;
|
old_endpoint = sef_self_endpoint;
|
||||||
sef_self_endpoint = RS_PROC_NR;
|
sef_self_endpoint = RS_PROC_NR;
|
||||||
}
|
}
|
||||||
|
#endif /* USE_LIVEUPDATE */
|
||||||
|
|
||||||
#if INTERCEPT_SEF_INIT_REQUESTS
|
#if INTERCEPT_SEF_INIT_REQUESTS
|
||||||
/* Intercept SEF Init requests. */
|
/* Intercept SEF Init requests. */
|
||||||
|
|
|
@ -430,6 +430,7 @@ PRIVATE int sef_cb_init_fresh(int type, sef_init_info_t *info)
|
||||||
if (OK != (s=sys_setalarm(RS_DELTA_T, 0)))
|
if (OK != (s=sys_setalarm(RS_DELTA_T, 0)))
|
||||||
panic("couldn't set alarm: %d", s);
|
panic("couldn't set alarm: %d", s);
|
||||||
|
|
||||||
|
#if USE_LIVEUPDATE
|
||||||
/* Now create a new RS instance with a private page table and let the current
|
/* Now create a new RS instance with a private page table and let the current
|
||||||
* instance live update into the replica. Clone RS' own slot first.
|
* instance live update into the replica. Clone RS' own slot first.
|
||||||
*/
|
*/
|
||||||
|
@ -489,6 +490,7 @@ PRIVATE int sef_cb_init_fresh(int type, sef_init_info_t *info)
|
||||||
}
|
}
|
||||||
NOT_REACHABLE;
|
NOT_REACHABLE;
|
||||||
}
|
}
|
||||||
|
#endif /* USE_LIVEUPDATE */
|
||||||
|
|
||||||
return(OK);
|
return(OK);
|
||||||
}
|
}
|
||||||
|
|
|
@ -759,7 +759,8 @@ _MKVARS.yes= \
|
||||||
MKYP
|
MKYP
|
||||||
#MINIX-specific vars
|
#MINIX-specific vars
|
||||||
_MKVARS.yes+= \
|
_MKVARS.yes+= \
|
||||||
MKWATCHDOG MKACPI MKAPIC MKMCONTEXT MKDEBUGREG MKSYSDEBUG
|
MKWATCHDOG MKACPI MKAPIC MKMCONTEXT MKDEBUGREG MKSYSDEBUG \
|
||||||
|
MKLIVEUPDATE MKSTATECTL
|
||||||
.for var in ${_MKVARS.yes}
|
.for var in ${_MKVARS.yes}
|
||||||
${var}?= yes
|
${var}?= yes
|
||||||
.endfor
|
.endfor
|
||||||
|
@ -826,6 +827,8 @@ MKMCONTEXT:= no
|
||||||
MKCOVERAGE:= no
|
MKCOVERAGE:= no
|
||||||
MKDEBUGREG:= no
|
MKDEBUGREG:= no
|
||||||
MKSYSDEBUG:= no
|
MKSYSDEBUG:= no
|
||||||
|
MKLIVEUPDATE:= no
|
||||||
|
MKSTATECTL:= no
|
||||||
.endif
|
.endif
|
||||||
|
|
||||||
#
|
#
|
||||||
|
@ -887,7 +890,8 @@ ${var}?= no
|
||||||
# variable is set to "no".
|
# variable is set to "no".
|
||||||
#
|
#
|
||||||
.for var in USE_HESIOD USE_INET6 USE_KERBEROS USE_LDAP USE_PAM USE_YP \
|
.for var in USE_HESIOD USE_INET6 USE_KERBEROS USE_LDAP USE_PAM USE_YP \
|
||||||
USE_WATCHDOG USE_ACPI USE_APIC USE_MCONTEXT USE_DEBUGREG USE_SYSDEBUG
|
USE_WATCHDOG USE_ACPI USE_APIC USE_MCONTEXT USE_DEBUGREG USE_SYSDEBUG \
|
||||||
|
USE_LIVEUPDATE USE_STATECTL
|
||||||
.if (${${var:S/USE_/MK/}} == "no")
|
.if (${${var:S/USE_/MK/}} == "no")
|
||||||
${var}:= no
|
${var}:= no
|
||||||
.else
|
.else
|
||||||
|
|
Loading…
Reference in a new issue