回复:[Zephyr-devel] Is The tick handler "z_clock_announce" in SMP mode dupulicate caculated?
"曹子龙
Hi andrew: i find the place you said laste emai, it seems only xtensa and x84 arch supports the SMP mode, so take xtensa for exmaple. it seems the mechanism you said in the laste email only effect when "CONFIG_TICKLESS_KERNEL" enabled. if the macro CONFIG_TICKLESS_KERNEL not enabled, the z_clock_announce still pased the 1 tick for each core, so the cur_tick would be doubled, where am i wrong? thanks for your kindly help. static void ccompare_isr(void *arg) { ARG_UNUSED(arg); k_spinlock_key_t key = k_spin_lock(&lock); u32_t curr = ccount(); u32_t dticks = (curr - last_count) / CYC_PER_TICK; last_count += dticks * CYC_PER_TICK; if (!IS_ENABLED(CONFIG_TICKLESS_KERNEL) || IS_ENABLED(CONFIG_QEMU_TICKLESS_WORKAROUND)) { u32_t next = last_count + CYC_PER_TICK; if ((s32_t)(next - curr) < MIN_DELAY) { next += CYC_PER_TICK; } set_ccompare(next); } k_spin_unlock(&lock, key); z_clock_announce(IS_ENABLED(CONFIG_TICKLESS_KERNEL) ? dticks : 1); } 曹子龙 珠海全志科技股份有限公司 BU1-PSW 地址:广东省珠海市高新区唐家湾镇科技2路9号 TEL:13824125580 Email:caozilong@... 网址: http://www.allwinnertech.com
|
|