Handout
This commit is contained in:
42
kernel/interrupt/epilogues.h
Normal file
42
kernel/interrupt/epilogues.h
Normal file
@@ -0,0 +1,42 @@
|
||||
/*! \file
|
||||
* \brief Abstraction for epilogue objects, basically function pointers.
|
||||
* \ingroup interrupts
|
||||
*/
|
||||
#pragma once
|
||||
#include "../object/key.h"
|
||||
#include "../types.h"
|
||||
|
||||
struct Vault;
|
||||
|
||||
/*! \brief A handler function for an epilogue.
|
||||
* \ingroup interrupts
|
||||
*
|
||||
* It receives the vault directly, because it is executed on level 1/2 (by the
|
||||
* \ref Guard) .
|
||||
*
|
||||
* \note Since it does only receive one parameter, other data must be passed
|
||||
* in a different way.
|
||||
*/
|
||||
using Epilogue = void (*)(Vault&);
|
||||
|
||||
namespace Epilogues {
|
||||
|
||||
/*!
|
||||
* @brief The keyboard epilogue.
|
||||
*
|
||||
* Handle the keyboard Key that has been fetched during the prologue.
|
||||
*
|
||||
* threads waiting for a key using the key semaphore.
|
||||
*
|
||||
* @param v The vault.
|
||||
*/
|
||||
void keyboard(Vault& v);
|
||||
extern Key key;
|
||||
|
||||
/*!
|
||||
* @brief Timer epilogue
|
||||
* @param v The vault.
|
||||
*/
|
||||
void timer(Vault& v);
|
||||
|
||||
}; // namespace Epilogues
|
||||
Reference in New Issue
Block a user