Rodrigo Arias
4993197fb9
Instead of showing the "attached" state with the VH{aA} events, we show when the call to nosv_attach() and nosv_detach() take place. The old VH{aA} events are now ignored. Bumps the nOS-V model version to 1.1.0.
29 lines
476 B
C
29 lines
476 B
C
/* Copyright (c) 2021-2023 Barcelona Supercomputing Center (BSC)
|
|
* SPDX-License-Identifier: GPL-3.0-or-later */
|
|
|
|
#include <nosv.h>
|
|
#include <unistd.h>
|
|
|
|
#include "common.h"
|
|
#include "compat.h"
|
|
|
|
int
|
|
main(void)
|
|
{
|
|
nosv_init();
|
|
|
|
nosv_task_t task;
|
|
if (nosv_attach(&task, NULL, "attached-task", 0) != 0)
|
|
die("nosv_attach failed");
|
|
|
|
sleep_us(100);
|
|
|
|
if (nosv_detach(0) != 0)
|
|
die("nosv_detach failed");
|
|
|
|
if (nosv_shutdown() != 0)
|
|
die("nosv_shutdown failed");
|
|
|
|
return 0;
|
|
}
|