MCPcopy Create free account
hub / github.com/doldecomp/mkdd / create

Method create

libs/JSystem/JKernel/JKRThread.cpp:334–358  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

332JKRTask::~JKRTask() { sTaskList.remove(&mTaskLink); }
333
334JKRTask *JKRTask::create(int reqCount, int threadPriority, u32 stackSize, JKRHeap *heap)
335{
336 if (heap == nullptr)
337 {
338 heap = JKRHeap::sCurrentHeap;
339 }
340 JKRTask *task = new (heap, 0) JKRTask(reqCount, threadPriority, stackSize);
341 if (task == nullptr)
342 {
343 return nullptr;
344 }
345 task->mRequest = new (heap, 0) Request[reqCount];
346 task->mRequestCnt = reqCount;
347 if (task->mRequest == nullptr)
348 {
349 delete task;
350 return nullptr;
351 }
352 for (int i = 0; i < reqCount; i++)
353 {
354 task->mRequest[i].mCb = nullptr;
355 }
356 sTaskList.append(&task->mTaskLink);
357 return task;
358}
359
360void *JKRTask::run()
361{

Callers

nothing calls this directly

Calls 1

appendMethod · 0.45

Tested by

no test coverage detected