]> Zhao Yanbai Git Server - minix.git/commitdiff
ds: Add live update extensions. 07/3107/1
authorCristiano Giuffrida <giuffrida@cs.vu.nl>
Sat, 18 Jul 2015 10:08:15 +0000 (12:08 +0200)
committerDavid van Moolenbroek <david@minix3.org>
Thu, 17 Sep 2015 13:26:09 +0000 (13:26 +0000)
Change-Id: I093c462ddad4a5e9b3dc39140f45f0e25e83bb55

minix/include/minix/sef.h
minix/lib/libsys/sef_llvm.c
minix/servers/ds/main.c

index 49202ad9f9e7ffda2baf001cb1f92be695e6e5da..dc5a1beed6e24f63606ce21d8e43da1799f291a8 100644 (file)
@@ -366,6 +366,7 @@ void sef_llvm_stack_refs_restore(char *stack_buff);
 int sef_llvm_state_transfer(sef_init_info_t *info);
 int sef_llvm_add_special_mem_region(void *addr, size_t len, const char* name);
 int sef_llvm_del_special_mem_region_by_addr(void *addr);
+void sef_llvm_ds_st_init(void);
 void *sef_llvm_ac_mmap(void *buf, size_t len, int prot, int flags, int fd,
        off_t offset);
 int sef_llvm_ac_munmap(void *buf, size_t len);
index 4f08fd9721a77dd86f3513fb01900c35ccc42fd9..90eb3d5f133b2801e34039027d0bdb1f4ed1a301 100644 (file)
@@ -153,6 +153,17 @@ int sef_llvm_del_special_mem_region_by_addr(void *addr)
     return st_del_special_mmapped_region_by_addr(addr);
 }
 
+/*===========================================================================*
+ *                             sef_llvm_ds_st_init                          *
+ *===========================================================================*/
+void sef_llvm_ds_st_init(void)
+{
+    extern void __attribute__((weak)) _magic_ds_st_init(void);
+    if (!_magic_ds_st_init)
+        return;
+    _magic_ds_st_init();
+}
+
 /*===========================================================================*
  *                             sef_llvm_ac_mmap                             *
  *===========================================================================*/
index ed28922171f61863cf4cd6a6fd70f5ff38cf8aa7..594732897a05c42b41d83c4548cc3271de26aa1b 100644 (file)
@@ -96,6 +96,9 @@ static void sef_local_startup()
   sef_setcb_init_fresh(sef_cb_init_fresh);
   sef_setcb_init_restart(sef_cb_init_fail);
 
+  /* Register state transfer callbacks. */
+  sef_llvm_ds_st_init();
+
   /* No live update support for now. */
 
   /* Let SEF perform startup. */