ocarina/include/core/idle.hpp
Anna Schumaker 95064e4537 Rename lib/ -> core/
I plan to introduce a new lib/ that sits between the gui and the backend
files (similar to how glibc sits between the kernel and userspace).
This gets the rename out of the way before I change my mind again.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-06-05 10:21:32 -04:00

29 lines
523 B
C++

/*
* Copyright 2013 (c) Anna Schumaker.
*
* DO NOT INCLUDE THIS FILE DIRECTLY. THIS IS A TEMPLATE DEFINITION FILE
* AND ONLY MEANT TO BE INCLUDED BY include/idle.h!
*/
#ifndef OCARINA_IDLE_HPP
#define OCARINA_IDLE_HPP
template <class T>
idle :: IdleTask<T> :: IdleTask(void (*fn)(T &), T param)
: func(fn), data(param)
{
IdleBase :: schedule();
}
template <class T>
idle :: IdleTask<T> :: ~IdleTask()
{
}
template <class T>
void idle :: IdleTask<T> :: run()
{
func(data);
}
#endif /* OCARINA_IDLE_HPP */