7#if defined(DUK_USE_DOUBLE_LINKED_HEAP) && defined(DUK_USE_REFERENCE_COUNTING)
35#ifdef DUK_USE_DOUBLE_LINKED_HEAP
46#ifdef DUK_USE_INTERRUPT_COUNTER
52 if (new_thr !=
NULL) {
54 if (curr_thr ==
NULL) {
58 DUK_DD(
DUK_DDPRINT(
"switch thread, initial entry, init default interrupt counter"));
59 new_thr->interrupt_counter = 0;
60 new_thr->interrupt_init = 0;
65#if defined(DUK_USE_DEBUG)
66 if (new_thr != curr_thr) {
70 new_thr->interrupt_counter = curr_thr->interrupt_counter;
71 new_thr->interrupt_init = curr_thr->interrupt_init;
74 DUK_DD(
DUK_DDPRINT(
"switch thread, new thread is NULL, no interrupt counter changes"));
#define DUK_HEAPHDR_GET_TYPE(h)
#define DUK_HEAPHDR_SET_NEXT(heap, h, val)
#define DUK_HEAPHDR_GET_PREV(heap, h)
#define DUK_HEAPHDR_SET_PREV(heap, h, val)
#define DUK_HEAPHDR_GET_NEXT(heap, h)
DUK_INTERNAL void duk_heap_remove_any_from_heap_allocated(duk_heap *heap, duk_heaphdr *hdr)
DUK_INTERNAL void duk_heap_insert_into_heap_allocated(duk_heap *heap, duk_heaphdr *hdr)
duk_hthread * curr_thread
duk_heaphdr * heap_allocated