diff --git a/pkg/urbit/include/noun/events.h b/pkg/urbit/include/noun/events.h index c1b95cde83..9b8376c895 100644 --- a/pkg/urbit/include/noun/events.h +++ b/pkg/urbit/include/noun/events.h @@ -80,11 +80,6 @@ c3_o u3e_yolo(void); - /* u3e_foul(): dirty all the pages of the loom. - */ - void - u3e_foul(void); - /* u3e_init(): initialize guard page tracking. */ void diff --git a/pkg/urbit/noun/events.c b/pkg/urbit/noun/events.c index a9004dd120..1ad2a27cd4 100644 --- a/pkg/urbit/noun/events.c +++ b/pkg/urbit/noun/events.c @@ -1328,7 +1328,7 @@ u3e_live(c3_o nuu_o, c3_c* dir_c) // mark all pages dirty (pages in the snapshot will be marked clean) // - u3e_foul(); + _ce_loom_track_north(0, u3P.pag_w); /* Write image files to memory; reinstate protection. */ @@ -1387,15 +1387,11 @@ u3e_yolo(void) c3_assert(0); } - return c3y; -} + // mark all pages dirty + // + _ce_loom_track_north(0, u3P.pag_w); -/* u3e_foul(): dirty all the pages of the loom. -*/ -void -u3e_foul(void) -{ - memset((void*)u3P.dit_w, 0xff, sizeof(u3P.dit_w)); + return c3y; } /* u3e_init(): initialize guard page tracking. diff --git a/pkg/urbit/noun/urth.c b/pkg/urbit/noun/urth.c index 0b8f022944..009442e9e0 100644 --- a/pkg/urbit/noun/urth.c +++ b/pkg/urbit/noun/urth.c @@ -416,10 +416,6 @@ _cu_realloc(FILE* fil_u, ur_root_t** tor_u, ur_nvec_t* doc_u) // u3A->eve_d = eve_d; - // mark all pages dirty - // - u3e_foul(); - *tor_u = rot_u; *doc_u = cod_u; @@ -847,10 +843,6 @@ u3u_uncram(c3_c* dir_c, c3_d eve_d) // u3A->eve_d = eve_d; - // mark all pages dirty - // - u3e_foul(); - // leave rocks on disk // // if ( 0 != c3_unlink(nam_c) ) { diff --git a/pkg/urbit/tests/events_tests.c b/pkg/urbit/tests/events_tests.c index f8615efcbf..f42ce56251 100644 --- a/pkg/urbit/tests/events_tests.c +++ b/pkg/urbit/tests/events_tests.c @@ -92,7 +92,12 @@ _test_tracking(void) { c3_w ret_w; - u3e_foul(); + _ce_loom_track_north(0, u3P.pag_w); + + if ( u3P.pag_w != (ret_w = _check_north_dirty(0, u3P.pag_w)) ) { + fprintf(stderr, "test events track north dirty all %u\r\n", ret_w); + return 0; + } if ( 0 != (ret_w = _check_north_clean()) ) { fprintf(stderr, "test events track north init %u\r\n", ret_w); @@ -217,6 +222,13 @@ _test_tracking(void) return 0; } + _ce_loom_track_north(0, u3P.pag_w); + + if ( u3P.pag_w != (ret_w = _check_north_dirty(0, u3P.pag_w)) ) { + fprintf(stderr, "test events track north dirty all %u\r\n", ret_w); + return 0; + } + return 1; }