1515 * limitations under the License.
1616 */
1717
18- #include " executorthread .h"
18+ #include " cb3_executorthread .h"
1919#include " bucket_logger.h"
2020#include " cb3_executorpool.h"
2121#include " globaltask.h"
2929#include < sstream>
3030
3131extern " C" {
32- static void launch_executor_thread (void * arg) {
33- auto * executor = (CB3ExecutorThread*)arg;
34- executor->run ();
35- }
32+ static void launch_executor_thread (void * arg) {
33+ auto * executor = (CB3ExecutorThread*)arg;
34+ executor->run ();
35+ }
3636}
3737
3838CB3ExecutorThread::~CB3ExecutorThread () {
@@ -48,7 +48,10 @@ void CB3ExecutorThread::start() {
4848 thread_name.replace (pos, worker.size (), " " );
4949 }
5050 thread_name.resize (15 );
51- if (cb_create_named_thread (&thread, launch_executor_thread, this , 0 ,
51+ if (cb_create_named_thread (&thread,
52+ launch_executor_thread,
53+ this ,
54+ 0 ,
5255 thread_name.c_str ()) != 0 ) {
5356 std::stringstream ss;
5457 ss << name.c_str () << " : Initialization error!!!" ;
@@ -118,13 +121,12 @@ void CB3ExecutorThread::run() {
118121 priority = getpriority (PRIO_PROCESS, 0 );
119122
120123 for (uint8_t tick = 1 ;; tick++) {
121-
122124 if (state != EXECUTOR_RUNNING) {
123125 break ;
124126 }
125127
126128 updateCurrentTime ();
127- if (TaskQueue * q = manager->nextTask (*this , tick)) {
129+ if (TaskQueue* q = manager->nextTask (*this , tick)) {
128130 manager->startWork (taskType);
129131
130132 if (currentTask->isdead ()) {
0 commit comments