#define sef_signal_debug_begin sef_debug_begin
#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 */
CPPFLAGS+= -DUSE_SYSDEBUG
.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
SRCS+= profile.c do_sprofile.c
#define USE_PHYSCOPY 1 /* copy using physical addressing */
#define USE_MEMSET 1 /* write char to a given memory area */
#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
* for the debugging dumps that can be generated with the IS server. The PM
# Makefile for libdriver
+.include <bsd.own.mk>
LIB= driver
SRCS= driver.c drvlib.c mq.c
+.if ${USE_STATECTL} != "no"
+CPPFLAGS+= -DUSE_STATECTL
+.endif
+
.include <bsd.lib.mk>
* For this reason, there may blocked callers when a driver restarts.
* Ask the kernel to unblock them (if any).
*/
+#if USE_STATECTL
r = sys_statectl(SYS_STATE_CLEAR_IPC_REFS);
if (r != OK) {
panic("driver_announce: sys_statectl failed: %d\n", r);
}
+#endif
/* Publish a driver up event. */
r = ds_retrieve_label_name(label, getprocnr());
CPPFLAGS+= -DUSE_COVERAGE
.endif
+.if ${USE_LIVEUPDATE} != "no"
+CPPFLAGS+= -DUSE_LIVEUPDATE
+.endif
+
CPPFLAGS.sched_start.c+= -I${MINIXSRCDIR}
.if (${CC} == "gcc") || (${CC} == "clang")
sef_self_priv_flags = priv_flags;
old_endpoint = NONE;
+#if USE_LIVEUPDATE
/* 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) {
r = vm_update(RS_PROC_NR, sef_self_endpoint);
old_endpoint = sef_self_endpoint;
sef_self_endpoint = RS_PROC_NR;
}
+#endif /* USE_LIVEUPDATE */
#if INTERCEPT_SEF_INIT_REQUESTS
/* Intercept SEF Init requests. */
if (OK != (s=sys_setalarm(RS_DELTA_T, 0)))
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
* instance live update into the replica. Clone RS' own slot first.
*/
}
NOT_REACHABLE;
}
+#endif /* USE_LIVEUPDATE */
return(OK);
}
MKYP
#MINIX-specific vars
_MKVARS.yes+= \
- MKWATCHDOG MKACPI MKAPIC MKMCONTEXT MKDEBUGREG MKSYSDEBUG
+ MKWATCHDOG MKACPI MKAPIC MKMCONTEXT MKDEBUGREG MKSYSDEBUG \
+ MKLIVEUPDATE MKSTATECTL
.for var in ${_MKVARS.yes}
${var}?= yes
.endfor
MKCOVERAGE:= no
MKDEBUGREG:= no
MKSYSDEBUG:= no
+MKLIVEUPDATE:= no
+MKSTATECTL:= no
.endif
#
# variable is set to "no".
#
.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")
${var}:= no
.else