diff options
author | Jere Leppänen <jere.leppanen@nokia.com> | 2021-11-03 16:15:15 +0200 |
---|---|---|
committer | Matias Elo <matias.elo@nokia.com> | 2021-11-12 09:44:18 +0200 |
commit | c4b1cde446777a397c99058de5c19aeffe1faacc (patch) | |
tree | 8ea5cd0f27005f655f6efe9d9ed4e49271cfb683 /helper | |
parent | ffce66a6945b62f10c37ab4b415810ae520828c4 (diff) |
helper: cli: remove unused instance parameter from odph_cli_init()
Now that the CLI helper no longer creates a thread, the ODP instance
is not needed by odph_cli_init().
Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com>
Reviewed-by: Matias Elo <matias.elo@nokia.com>
Diffstat (limited to 'helper')
-rw-r--r-- | helper/cli.c | 4 | ||||
-rw-r--r-- | helper/include/odp/helper/cli.h | 3 | ||||
-rw-r--r-- | helper/test/cli.c | 2 |
3 files changed, 3 insertions, 6 deletions
diff --git a/helper/cli.c b/helper/cli.c index e9ca2f783..97fa232a3 100644 --- a/helper/cli.c +++ b/helper/cli.c @@ -43,7 +43,6 @@ typedef struct { /* Guards cli_fd and run, which must be accessed atomically. */ odp_spinlock_t lock; odp_spinlock_t api_lock; - odp_instance_t instance; odph_cli_param_t cli_param; struct sockaddr_in addr; uint32_t num_user_commands; @@ -75,7 +74,7 @@ static cli_shm_t *shm_lookup(void) return shm; } -int odph_cli_init(odp_instance_t instance, const odph_cli_param_t *param) +int odph_cli_init(const odph_cli_param_t *param) { if (odp_shm_lookup(shm_name) != ODP_SHM_INVALID) { ODPH_ERR("Error: shm %s already exists\n", shm_name); @@ -101,7 +100,6 @@ int odph_cli_init(odp_instance_t instance, const odph_cli_param_t *param) odp_spinlock_init(&shm->api_lock); shm->listen_fd = -1; shm->cli_fd = -1; - shm->instance = instance; shm->addr.sin_family = AF_INET; shm->addr.sin_port = htons(param->port); diff --git a/helper/include/odp/helper/cli.h b/helper/include/odp/helper/cli.h index 982509f53..b2f88d7bc 100644 --- a/helper/include/odp/helper/cli.h +++ b/helper/include/odp/helper/cli.h @@ -76,12 +76,11 @@ void odph_cli_param_init(odph_cli_param_t *param); * In process mode (ODPH_PROC_MODE), this function must be called before * creating the thread which calls odph_cli_run(). * - * @param instance ODP instance * @param param CLI server parameters to use * @retval 0 Success * @retval <0 Failure */ -int odph_cli_init(odp_instance_t instance, const odph_cli_param_t *param); +int odph_cli_init(const odph_cli_param_t *param); /** * Register a user defined command diff --git a/helper/test/cli.c b/helper/test/cli.c index 475a99b90..4fa403f5a 100644 --- a/helper/test/cli.c +++ b/helper/test/cli.c @@ -48,7 +48,7 @@ int main(int argc, char *argv[]) odph_cli_param_init(&cli_param); - if (odph_cli_init(instance, &cli_param)) { + if (odph_cli_init(&cli_param)) { ODPH_ERR("Error: odph_cli_init() failed.\n"); exit(EXIT_FAILURE); } |