1/** 2 * \file 3 * \brief Kernel scheduling API 4 */ 5 6/* 7 * Copyright (c) 2007, 2008, 2010, ETH Zurich. 8 * All rights reserved. 9 * 10 * This file is distributed under the terms in the attached LICENSE file. 11 * If you do not find this file, copies can be found by writing to: 12 * ETH Zurich D-INFK, Universitaetstrasse 6, CH-8092 Zurich. Attn: Systems Group. 13 */ 14 15#ifndef KERNEL_SCHEDULE_H 16#define KERNEL_SCHEDULE_H 17 18/* Return the DCB to dispatch. */ 19struct dcb *schedule(void); 20 21/* Unblock a dispatcher - insert into scheduler queue. */ 22/* scheduler_add() */ 23void make_runnable(struct dcb *dcb); 24 25/* Break RBED by setting release time of this DCB to *now*. */ 26/* schedule(r) */ 27void schedule_now(struct dcb *dcb); 28 29/** 30 * \brief Remove 'dcb' from scheduler ring. 31 * 32 * Removes dispatcher 'dcb' from the scheduler ring. If it was not in 33 * the ring, this function is a no-op. The postcondition for this 34 * function is that dcb is not in the ring. 35 * 36 * \param dcb Pointer to DCB to remove. 37 38 * Opposite of make_runnable. 39 */ 40void scheduler_remove(struct dcb *dcb); 41 42/* Yield. */ 43void scheduler_yield(struct dcb *dcb); 44 45/* Coreboot stuff from here on. */ 46 47/* Kernel has rebooted, start scheduling from scratch. */ 48void scheduler_reset_time(void); 49 50/* Convert scheduler parameters to the current scheduler for the whole KCB. */ 51void scheduler_convert(void); 52 53/* Necessary? Calls reset_time. */ 54void scheduler_restore_state(void); 55 56#endif 57