diff options
author | Matt Macy <mmacy@FreeBSD.org> | 2018-08-21 03:33:54 +0000 |
---|---|---|
committer | Matt Macy <mmacy@FreeBSD.org> | 2018-08-21 03:33:54 +0000 |
commit | 2aae9642a5cac5000b8c76e1f4c5b1dceb4f866b (patch) | |
tree | 87b88a92d058abeaaa393cb0b41227c910554668 | |
parent | 4e1ef62a367de01ccb7156bfe6ec2d613d6eb860 (diff) | |
download | src-2aae9642a5cac5000b8c76e1f4c5b1dceb4f866b.tar.gz src-2aae9642a5cac5000b8c76e1f4c5b1dceb4f866b.zip |
Notes
-rw-r--r-- | sys/sys/epoch.h | 2 | ||||
-rw-r--r-- | sys/sys/epoch_private.h | 10 |
2 files changed, 6 insertions, 6 deletions
diff --git a/sys/sys/epoch.h b/sys/sys/epoch.h index 095aab57f9d8..8d05c81e964b 100644 --- a/sys/sys/epoch.h +++ b/sys/sys/epoch.h @@ -52,7 +52,7 @@ typedef struct epoch_context *epoch_context_t; struct epoch_tracker { void *datap[3]; -#ifdef INVARIANTS +#ifdef EPOCH_TRACKER_DEBUG int datai[5]; #else int datai[1]; diff --git a/sys/sys/epoch_private.h b/sys/sys/epoch_private.h index ea39dff093d5..ff16fe7a4983 100644 --- a/sys/sys/epoch_private.h +++ b/sys/sys/epoch_private.h @@ -76,13 +76,13 @@ critical_exit_sa(void *tdarg) } typedef struct epoch_thread { -#ifdef INVARIANTS +#ifdef EPOCH_TRACKER_DEBUG uint64_t et_magic_pre; #endif TAILQ_ENTRY(epoch_thread) et_link; /* Epoch queue. */ struct thread *et_td; /* pointer to thread in section */ ck_epoch_section_t et_section; /* epoch section object */ -#ifdef INVARIANTS +#ifdef EPOCH_TRACKER_DEBUG uint64_t et_magic_post; #endif } *epoch_thread_t; @@ -124,8 +124,8 @@ epoch_enter_preempt(epoch_t epoch, epoch_tracker_t et) MPASS(cold || epoch != NULL); INIT_CHECK(epoch); etd = (void *)et; -#ifdef INVARIANTS MPASS(epoch->e_flags & EPOCH_PREEMPT); +#ifdef EPOCH_TRACKER_DEBUG etd->et_magic_pre = EPOCH_MAGIC0; etd->et_magic_post = EPOCH_MAGIC1; #endif @@ -174,15 +174,15 @@ epoch_exit_preempt(epoch_t epoch, epoch_tracker_t et) er = epoch_currecord(epoch); MPASS(epoch->e_flags & EPOCH_PREEMPT); etd = (void *)et; -#ifdef INVARIANTS MPASS(etd != NULL); MPASS(etd->et_td == (struct thread *)td); +#ifdef EPOCH_TRACKER_DEBUG MPASS(etd->et_magic_pre == EPOCH_MAGIC0); MPASS(etd->et_magic_post == EPOCH_MAGIC1); etd->et_magic_pre = 0; etd->et_magic_post = 0; - etd->et_td = (void*)0xDEADBEEF; #endif + etd->et_td = (void*)0xDEADBEEF; ck_epoch_end(&er->er_record, (ck_epoch_section_t *)&etd->et_section); TAILQ_REMOVE(&er->er_tdlist, etd, et_link); |