diff options
author | imarom <imarom@cisco.com> | 2015-11-01 14:28:28 +0200 |
---|---|---|
committer | imarom <imarom@cisco.com> | 2015-11-01 14:28:28 +0200 |
commit | ee2c7f45e0bf973443b70eb8329811bcad44f83a (patch) | |
tree | c3f2cc1db1b090bedfd80979c931d50708053100 /src/main.cpp | |
parent | a1971ec3a7f6cbe0aea1393a57aa17bf44deedac (diff) |
stateless cores starts on IDLE - and starts the scheduler only when
traffic is being transmitted
if the traffic stops completely on the core - back to IDLE state
Diffstat (limited to 'src/main.cpp')
-rwxr-xr-x | src/main.cpp | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/src/main.cpp b/src/main.cpp index 0321761f..bd64c5a4 100755 --- a/src/main.cpp +++ b/src/main.cpp @@ -185,25 +185,6 @@ int curent_time(){ #include <pthread.h> -void delay(int msec){ - - if (msec == 0) - {//user that requested that probebly wanted the minimal delay - //but because of scaling problem he have got 0 so we will give the min delay - //printf("\n\n\nERROR-Task delay ticks == 0 found in task %s task id = %d\n\n\n\n", - // SANB_TaskName(SANB_TaskIdSelf()), SANB_TaskIdSelf()); - msec =1; - - } - - struct timespec time1, remain; // 2 sec max delay - time1.tv_sec=msec/1000; - time1.tv_nsec=(msec - (time1.tv_sec*1000))*1000000; - - nanosleep(&time1,&remain); -} - - struct per_thread_t { pthread_t tid; }; |