116359Sasami/*
216359Sasami * Copyright 2017, Data61
316359Sasami * Commonwealth Scientific and Industrial Research Organisation (CSIRO)
416359Sasami * ABN 41 687 119 230.
516359Sasami *
641597Skato * This software may be distributed and modified according to the terms of
716359Sasami * the BSD 2-Clause license. Note that NO WARRANTY is provided.
816359Sasami * See "LICENSE_BSD2.txt" for details.
916359Sasami *
1016359Sasami * @TAG(DATA61_BSD)
1116359Sasami */
1216359Sasami
1316359Sasami#include <sel4/sel4.h>
1416359Sasami
1516359Sasami/*? macros.show_includes(me.instance.type.includes) ?*/
1616359Sasami
1716359Sasami/*- set notification = alloc('notification', seL4_NotificationObject, write=True) -*/
1816359Sasami/*- set badge = configuration[me.instance.name].get('%s_attributes' % me.interface.name) -*/
1916359Sasami/*- if badge is not none -*/
2016359Sasami    /*- set badge = badge.strip('"') -*/
2130665Skato    /*- do cap_space.cnode[notification].set_badge(int(badge, 0)) -*/
2241198Skato/*- endif -*/
2330665Skato
2438727Skatoint /*? me.interface.name ?*/__run(void) {
2525088Skato    /* Nothing required. */
2627690Skato    return 0;
2727690Skato}
2816359Sasami
2916359Sasamivoid /*? me.interface.name ?*/_emit_underlying(void) {
3016359Sasami    seL4_Signal(/*? notification ?*/);
3116359Sasami}
3216359Sasami