1/* 2 * Copyright 2017, Data61 3 * Commonwealth Scientific and Industrial Research Organisation (CSIRO) 4 * ABN 41 687 119 230. 5 * 6 * This software may be distributed and modified according to the terms of 7 * the GNU General Public License version 2. Note that NO WARRANTY is provided. 8 * See "LICENSE_GPLv2.txt" for details. 9 * 10 * @TAG(DATA61_GPL) 11 */ 12 13#include <config.h> 14#include <model/smp.h> 15#include <object/tcb.h> 16 17#ifdef ENABLE_SMP_SUPPORT 18 19void migrateTCB(tcb_t *tcb, word_t new_core) 20{ 21#ifdef CONFIG_DEBUG_BUILD 22 tcbDebugRemove(tcb); 23#endif 24 Arch_migrateTCB(tcb); 25 tcb->tcbAffinity = new_core; 26#ifdef CONFIG_DEBUG_BUILD 27 tcbDebugAppend(tcb); 28#endif 29} 30 31#endif /* ENABLE_SMP_SUPPORT */ 32