1 /* 2 * Copyright (c) 2015 Stefan Kristiansson 3 * 4 * Use of this source code is governed by a MIT-style 5 * license that can be found in the LICENSE file or at 6 * https://opensource.org/licenses/MIT 7 */ 8 #include <kernel/thread.h> 9 10 enum handler_return platform_irq(void); 11 enum handler_return platform_tick(void); 12 or1k_irq(void)13void or1k_irq(void) { 14 if (platform_irq() == INT_RESCHEDULE) 15 thread_preempt(); 16 } 17 or1k_tick(void)18void or1k_tick(void) { 19 if (platform_tick() == INT_RESCHEDULE) 20 thread_preempt(); 21 } 22