summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: eeb317c)
raw | patch | inline | side by side (parent: eeb317c)
author | Tinku Mannan <tmannan@ti.com> | |
Fri, 25 Jul 2014 14:00:31 +0000 (10:00 -0400) | ||
committer | Tinku Mannan <tmannan@ti.com> | |
Fri, 25 Jul 2014 14:00:31 +0000 (10:00 -0400) |
ti/runtime/netapi/test/net_test_loopback.c | patch | blob | history | |
ti/runtime/netapi/test/net_test_router.c | patch | blob | history |
diff --git a/ti/runtime/netapi/test/net_test_loopback.c b/ti/runtime/netapi/test/net_test_loopback.c
index 2dac9a251fe0656427ee383f0b73ef65cc781a3a..d85a8f1b9db31dd3f2aa9f37f89f8f7527eb6a6b 100755 (executable)
extern paSysStats_t netcp_stats;
extern Rm_ServiceHandle *rmClientServiceHandle;
+hplib_spinLock_T net_test_thread_lock;
netTestConfig_t netTestCfg;
}
hplib_utilSetupThread(thread_num, &cpu_set, hplib_spinLock_Type_LOL);
#endif
+ hplib_mSpinLockLock(&net_test_thread_lock);
worker_nh[thread_num]=netapi_init(NETAPI_CORE_MASTER,NULL);
if (worker_nh[thread_num] == NULL)
{
printf("fast_path_thread: netapi_init failure, exiting\n");
+ hplib_mSpinLockUnlock(&net_test_thread_lock);
exit(1);
}
+ hplib_mSpinLockUnlock(&net_test_thread_lock);
/* open netcp default RX channels*/
rx_chan = netapi_pktioOpen(worker_nh[thread_num], NETCP_RX, (PKTIO_CB) recv_cb, &netcp_rx_cfg, &err);
printf("main: initRm() returned error\n");
exit(1);
}
+ hplib_mSpinLockInit(&net_test_thread_lock );
our_netapi_default_cfg.rmHandle = rmClientServiceHandle;
memset(&config_file, 0, sizeof(netTestConfigFile_t));
memset(&netTestCfg, 0, sizeof(netTestConfig_t));
index 2d753a59dac95f235d920c0eda61373bd7859498..44c6cf0c0b577bead71882f3894f4f595803fce2 100755 (executable)
#endif
/* Global definitions */
+extern Rm_ServiceHandle *rmClientServiceHandle;
+
+hplib_spinLock_T net_test_thread_lock;
netTestConfig_t netTestCfg;
static netTestConfigFile_t config_file;
}
hplib_utilSetupThread(thread_num, &cpu_set, hplib_spinLock_Type_LOL);
#endif
+ hplib_mSpinLockLock(&net_test_thread_lock);
worker_nh[thread_num]=netapi_init(NETAPI_CORE_MASTER,
NULL);
if (worker_nh[thread_num] == NULL)
{
printf("fast_path_thread: netapi_init failure, exiting\n");
+ hplib_mSpinLockUnlock(&net_test_thread_lock);
exit(1);
}
+ hplib_mSpinLockUnlock(&net_test_thread_lock);
NETAPI_HANDLE_T * n = (NETAPI_HANDLE_T *) worker_nh[thread_num];
/* open netcp RX channel */
}
else
{
+ if (initRm())
+ {
+ printf("main: initRm() returned error\n");
+ exit(1);
+ }
+ hplib_mSpinLockInit(&net_test_thread_lock );
+ our_netapi_default_cfg.rmHandle = rmClientServiceHandle;
memset(&config_file, 0, sizeof(netTestConfigFile_t));
memset(&netTestCfg, 0, sizeof(netTestConfig_t));
netTest_utilProcessConfigFile(fpr,&config_file);