MCPcopy Create free account
hub / github.com/F-Stack/f-stack / CreateThread

Method CreateThread

adapter/micro_thread/micro_thread.cpp:636–652  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

634}
635
636MicroThread* MtFrame::CreateThread(ThreadStart entry, void *args, bool runable)
637{
638 MtFrame* mtframe = MtFrame::Instance();
639 MicroThread* thread = mtframe->AllocThread();
640 if (NULL == thread)
641 {
642 MTLOG_ERROR("create thread failed");
643 return NULL;
644 }
645 thread->SetSartFunc(entry, args);
646
647 if (runable) {
648 mtframe->InsertRunable(thread);
649 }
650
651 return thread;
652}
653
654int MtFrame::Loop(void* args)
655{

Callers 1

mt_start_threadFunction · 0.80

Calls 3

AllocThreadMethod · 0.80
SetSartFuncMethod · 0.80
InsertRunableMethod · 0.80

Tested by

no test coverage detected