projects
/
bertos.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
sam3 pmc: add functions to handle peripheral clock enable/disable;
[bertos.git]
/
bertos
/
mware
/
event.c
diff --git
a/bertos/mware/event.c
b/bertos/mware/event.c
index c596e12fa4d591d3af461cf404997e94ff892f77..489014dbc1f73ff76e3a6e637bcccc2f1cfdb48c 100644
(file)
--- a/
bertos/mware/event.c
+++ b/
bertos/mware/event.c
@@
-32,26
+32,48
@@
*
* \brief Events handling implementation
*
*
* \brief Events handling implementation
*
- * \version $Id$
*
* \author Giovanni Bajo <rasky@develer.com>
*/
#include "event.h"
*
* \author Giovanni Bajo <rasky@develer.com>
*/
#include "event.h"
+#include "cfg/cfg_signal.h"
+#include "cfg/cfg_timer.h"
void event_hook_ignore(UNUSED_ARG(Event *, e))
{
}
void event_hook_ignore(UNUSED_ARG(Event *, e))
{
}
-#if
defined(CONFIG_KERN_SIGNALS) &&
CONFIG_KERN_SIGNALS
+#if CONFIG_KERN_SIGNALS
void event_hook_signal(Event *e)
{
sig_post((e)->Ev.Sig.sig_proc, (e)->Ev.Sig.sig_bit);
}
void event_hook_signal(Event *e)
{
sig_post((e)->Ev.Sig.sig_proc, (e)->Ev.Sig.sig_bit);
}
+
+void event_hook_generic_signal(Event *e)
+{
+ sig_postSignal(&e->Ev.SigGen.sig,
+ e->Ev.SigGen.sig_proc,
+ EVENT_GENERIC_SIGNAL);
+}
#endif
void event_hook_softint(Event *e)
{
e->Ev.Int.func(e->Ev.Int.user_data);
}
#endif
void event_hook_softint(Event *e)
{
e->Ev.Int.func(e->Ev.Int.user_data);
}
+
+void event_hook_generic(Event *e)
+{
+ e->Ev.Gen.completed = true;
+ MEMORY_BARRIER;
+}
+
+#if CONFIG_TIMER_EVENTS
+void event_hook_generic_timeout(Event *e)
+{
+ e->Ev.Gen.completed = true;
+ MEMORY_BARRIER;
+}
+#endif