blob: 41f7d90d4607838a783fb20fb649c065ba4ed03d [file] [log] [blame] [edit]
/*
* Copyright 2017, Data61, CSIRO (ABN 41 687 119 230)
*
* SPDX-License-Identifier: GPL-2.0-only
*/
#include <camkes.h>
static int global;
static void callback(void *arg)
{
int *ret = arg;
*ret = global;
int error = binsem_post();
assert(!error);
}
int echo_echo(int i)
{
int ret;
global = i;
int error = ready_reg_callback(callback, &ret);
assert(!error);
error = binsem_wait();
assert(!error);
return ret;
}