nmc-utils
0.1.1
|
#include <stdio.h>
#include <getopt.h>
#include <sys/ioctl.h>
#include <unistd.h>
#include <stdlib.h>
#include <string.h>
#include <stdint.h>
#include <sys/epoll.h>
#include <easynmc.h>
Go to the source code of this file.
Macros | |
#define | dbg(fmt,...) |
#define | err(fmt,...) |
#define | NUMEVENTS 16 |
Functions | |
int | do_dump_core_info (struct easynmc_handle *h, void *udata) |
int | do_boot_core (struct easynmc_handle *h, void *optarg) |
int | do_dump_ldr_info (struct easynmc_handle *h, void *optarg) |
int | do_reset_stats (struct easynmc_handle *h, void *optarg) |
int | do_load_abs (struct easynmc_handle *h, void *arg) |
int | do_start_app (struct easynmc_handle *h, void *optarg) |
int | do_irq (struct easynmc_handle *h, void *optarg) |
int | do_mon (struct easynmc_handle *h, void *optarg) |
int | do_kill (struct easynmc_handle *h, void *optarg) |
int | do_mon_epoll (struct easynmc_handle *h, void *optarg) |
void | usage (char *nm) |
int | main (int argc, char **argv) |
Variables | |
int | g_debug = 1 |
int | g_force = 0 |
int | g_nostdio = 0 |
#define dbg | ( | fmt, | |
... | |||
) |
#define err | ( | fmt, | |
... | |||
) |
#define NUMEVENTS 16 |
Definition at line 250 of file nmctl.c.
Referenced by do_mon_epoll().
int do_boot_core | ( | struct easynmc_handle * | h, |
void * | optarg | ||
) |
Definition at line 106 of file nmctl.c.
References easynmc_boot_core(), and easynmc_handle::id.
Referenced by main().
int do_dump_core_info | ( | struct easynmc_handle * | h, |
void * | udata | ||
) |
Definition at line 50 of file nmctl.c.
References easynmc_appid_get(), easynmc_startupcode_is_compatible(), easynmc_state_name(), easynmc_handle::id, easynmc_handle::imem32, easynmc_handle::iofd, and NMC_REG_CODEVERSION.
Referenced by main().
int do_dump_ldr_info | ( | struct easynmc_handle * | h, |
void * | optarg | ||
) |
Definition at line 121 of file nmctl.c.
References easynmc_handle::imem32, NMC_REG_APPDATA_SIZE, NMC_REG_CODEVERSION, NMC_REG_CORE_START, NMC_REG_CORE_STATUS, NMC_REG_ISR_ON_START, NMC_REG_PROG_ENTRY, and NMC_REG_PROG_RETURN.
Referenced by main().
int do_irq | ( | struct easynmc_handle * | h, |
void * | optarg | ||
) |
Definition at line 190 of file nmctl.c.
References easynmc_close(), and easynmc_send_irq().
Referenced by main().
int do_kill | ( | struct easynmc_handle * | h, |
void * | optarg | ||
) |
Definition at line 223 of file nmctl.c.
References EASYNMC_CORE_COLD, EASYNMC_CORE_IDLE, EASYNMC_CORE_RUNNING, easynmc_stop_app(), g_force, and easynmc_handle::id.
Referenced by main().
int do_load_abs | ( | struct easynmc_handle * | h, |
void * | arg | ||
) |
Definition at line 142 of file nmctl.c.
References ABSLOAD_FLAG_ARGS, ABSLOAD_FLAG_DEFAULT, ABSLOAD_FLAG_FORCE, ABSLOAD_FLAG_STDIO, easynmc_boot_core(), EASYNMC_CORE_COLD, easynmc_load_abs(), g_force, and g_nostdio.
Referenced by main().
int do_mon | ( | struct easynmc_handle * | h, |
void * | optarg | ||
) |
Definition at line 209 of file nmctl.c.
References easynmc_evt_name(), easynmc_token_new(), easynmc_token_wait(), and easynmc_token::tok.
Referenced by main().
int do_mon_epoll | ( | struct easynmc_handle * | h, |
void * | optarg | ||
) |
Definition at line 251 of file nmctl.c.
References easynmc_pollmark(), easynmc_handle::id, easynmc_handle::memfd, and NUMEVENTS.
int do_reset_stats | ( | struct easynmc_handle * | h, |
void * | optarg | ||
) |
int do_start_app | ( | struct easynmc_handle * | h, |
void * | optarg | ||
) |
Definition at line 174 of file nmctl.c.
References easynmc_close(), EASYNMC_PERSIST_ENABLE, easynmc_persist_set(), and easynmc_start_app().
Referenced by main().
int main | ( | int | argc, |
char ** | argv | ||
) |
Definition at line 384 of file nmctl.c.
References do_boot_core(), do_dump_core_info(), do_dump_ldr_info(), do_irq(), do_kill(), do_load_abs(), do_mon(), do_reset_stats(), do_start_app(), and usage().
int g_force = 0 |
Definition at line 34 of file nmctl.c.
Referenced by do_kill(), and do_load_abs().
int g_nostdio = 0 |
Definition at line 35 of file nmctl.c.
Referenced by do_load_abs(), and main().