MCPcopy Create free account
hub / github.com/defold/defold / JobSystemPushJob

Function JobSystemPushJob

engine/dlib/src/dlib/jobsystem.cpp:287–308  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

285}
286
287JobSystemResult JobSystemPushJob(HJobContext context, HJob hjob)
288{
289 if (dmAtomicGet32(&context->m_Initialized) == 0)
290 {
291 return JOBSYSTEM_RESULT_ERROR;
292 }
293
294 JobThreadContext* ctx = &context->m_ThreadContext;
295
296 JobSystemStatus status = PutWork(ctx, hjob);
297 if (status == JOBSYSTEM_STATUS_CANCELED)
298 return JOBSYSTEM_RESULT_CANCELED;
299
300#if defined(DM_HAS_THREADS)
301 if (ctx->m_WakeupCond)
302 {
303 dmConditionVariable::Signal(ctx->m_WakeupCond);
304 }
305#endif
306
307 return JOBSYSTEM_RESULT_OK;
308}
309
310void* JobSystemGetContext(HJobContext context, HJob hjob)
311{

Callers 14

PushAsyncJobFunction · 0.85
PushJobFunction · 0.85
PushJobMethod · 0.85
TEST_PFunction · 0.85
PreloadDataFunction · 0.85
PushPendingJobFunction · 0.85
GenerateGlyphJobByIndexFunction · 0.85
DispatchRequestFunction · 0.85
NullDeleteTextureAsyncFunction · 0.85
NullSetTextureAsyncFunction · 0.85
OpenGLDeleteTextureAsyncFunction · 0.85

Calls 3

dmAtomicGet32Function · 0.85
PutWorkFunction · 0.85
SignalFunction · 0.70

Tested by 3

PushJobFunction · 0.68
PushJobMethod · 0.68
TEST_PFunction · 0.68