1 /* 2 * Copyright (c) 2023 Nordic Semiconductor ASA 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 */ 6 #ifndef NSI_COMMON_SRC_INCL_NCT_IF_H 7 #define NSI_COMMON_SRC_INCL_NCT_IF_H 8 9 #ifdef __cplusplus 10 extern "C" { 11 #endif 12 13 /* 14 * Interface provided by the Native simulator CPU threading emulation 15 * 16 * A description of each function can be found in the C file 17 * 18 * In docs/NCT.md you can find more information 19 */ 20 21 void *nct_init(void (*fptr)(void *)); 22 void nct_clean_up(void *this); 23 void nct_swap_threads(void *this, int next_allowed_thread_nbr); 24 void nct_first_thread_start(void *this, int next_allowed_thread_nbr); 25 int nct_new_thread(void *this, void *payload); 26 void nct_abort_thread(void *this, int thread_idx); 27 int nct_get_unique_thread_id(void *this, int thread_idx); 28 int nct_thread_name_set(void *this, int thread_idx, const char *str); 29 30 #ifdef __cplusplus 31 } 32 #endif 33 34 #endif /* NSI_COMMON_SRC_INCL_NCT_IF_H */ 35