Lines Matching refs:wJobID
1095 unsigned const wJobID = jobNb & mtctx->jobIDMask; in ZSTDMT_getFrameProgression() local
1096 ZSTDMT_jobDescription* jobPtr = &mtctx->jobs[wJobID]; in ZSTDMT_getFrameProgression()
1108 ZSTD_pthread_mutex_unlock(&mtctx->jobs[wJobID].job_mutex); in ZSTDMT_getFrameProgression()
1123 { unsigned const wJobID = jobID & mtctx->jobIDMask; in ZSTDMT_toFlushNow() local
1124 ZSTDMT_jobDescription* const jobPtr = &mtctx->jobs[wJobID]; in ZSTDMT_toFlushNow()
1141 ZSTD_pthread_mutex_unlock(&mtctx->jobs[wJobID].job_mutex); in ZSTDMT_toFlushNow()
1438 unsigned const wJobID = mtctx->doneJobID & mtctx->jobIDMask; in ZSTDMT_flushProduced() local
1443 ZSTD_PTHREAD_MUTEX_LOCK(&mtctx->jobs[wJobID].job_mutex); in ZSTDMT_flushProduced()
1446 assert(mtctx->jobs[wJobID].dstFlushed <= mtctx->jobs[wJobID].cSize); in ZSTDMT_flushProduced()
1447 … while (mtctx->jobs[wJobID].dstFlushed == mtctx->jobs[wJobID].cSize) { /* nothing to flush */ in ZSTDMT_flushProduced()
1448 if (mtctx->jobs[wJobID].consumed == mtctx->jobs[wJobID].src.size) { in ZSTDMT_flushProduced()
1450 … mtctx->doneJobID, (U32)mtctx->jobs[wJobID].consumed, (U32)mtctx->jobs[wJobID].src.size); in ZSTDMT_flushProduced()
1454 mtctx->doneJobID, (U32)mtctx->jobs[wJobID].dstFlushed); in ZSTDMT_flushProduced()
1455 …ZSTD_pthread_cond_wait(&mtctx->jobs[wJobID].job_cond, &mtctx->jobs[wJobID].job_mutex); /* block w… in ZSTDMT_flushProduced()
1459 { size_t cSize = mtctx->jobs[wJobID].cSize; /* shared */ in ZSTDMT_flushProduced()
1460 size_t const srcConsumed = mtctx->jobs[wJobID].consumed; /* shared */ in ZSTDMT_flushProduced()
1461 …size_t const srcSize = mtctx->jobs[wJobID].src.size; /* read-only, could be done after mutex… in ZSTDMT_flushProduced()
1462 ZSTD_pthread_mutex_unlock(&mtctx->jobs[wJobID].job_mutex); in ZSTDMT_flushProduced()
1473 && mtctx->jobs[wJobID].frameChecksumNeeded ) { in ZSTDMT_flushProduced()
1476 … MEM_writeLE32((char*)mtctx->jobs[wJobID].dstBuff.start + mtctx->jobs[wJobID].cSize, checksum); in ZSTDMT_flushProduced()
1478 … mtctx->jobs[wJobID].cSize += 4; /* can write this shared value, as worker is no longer active */ in ZSTDMT_flushProduced()
1479 mtctx->jobs[wJobID].frameChecksumNeeded = 0; in ZSTDMT_flushProduced()
1483 … size_t const toFlush = MIN(cSize - mtctx->jobs[wJobID].dstFlushed, output->size - output->pos); in ZSTDMT_flushProduced()
1487 assert(cSize >= mtctx->jobs[wJobID].dstFlushed); in ZSTDMT_flushProduced()
1488 assert(mtctx->jobs[wJobID].dstBuff.start != NULL); in ZSTDMT_flushProduced()
1491 (const char*)mtctx->jobs[wJobID].dstBuff.start + mtctx->jobs[wJobID].dstFlushed, in ZSTDMT_flushProduced()
1495 … mtctx->jobs[wJobID].dstFlushed += toFlush; /* can write : this value is only used by mtctx */ in ZSTDMT_flushProduced()
1498 …&& (mtctx->jobs[wJobID].dstFlushed == cSize) ) { /* output buffer fully flushed => free this job… in ZSTDMT_flushProduced()
1500 mtctx->doneJobID, (U32)mtctx->jobs[wJobID].dstFlushed); in ZSTDMT_flushProduced()
1501 ZSTDMT_releaseBuffer(mtctx->bufPool, mtctx->jobs[wJobID].dstBuff); in ZSTDMT_flushProduced()
1503 mtctx->jobs[wJobID].dstBuff = g_nullBuffer; in ZSTDMT_flushProduced()
1504 …mtctx->jobs[wJobID].cSize = 0; /* ensure this job slot is considered "not started" in future che… in ZSTDMT_flushProduced()
1511 if (cSize > mtctx->jobs[wJobID].dstFlushed) return (cSize - mtctx->jobs[wJobID].dstFlushed); in ZSTDMT_flushProduced()
1534 unsigned const wJobID = jobID & mtctx->jobIDMask; in ZSTDMT_getInputDataInUse() local
1537 ZSTD_PTHREAD_MUTEX_LOCK(&mtctx->jobs[wJobID].job_mutex); in ZSTDMT_getInputDataInUse()
1538 consumed = mtctx->jobs[wJobID].consumed; in ZSTDMT_getInputDataInUse()
1539 ZSTD_pthread_mutex_unlock(&mtctx->jobs[wJobID].job_mutex); in ZSTDMT_getInputDataInUse()
1541 if (consumed < mtctx->jobs[wJobID].src.size) { in ZSTDMT_getInputDataInUse()
1542 range_t range = mtctx->jobs[wJobID].prefix; in ZSTDMT_getInputDataInUse()
1545 range = mtctx->jobs[wJobID].src; in ZSTDMT_getInputDataInUse()
1548 assert(range.start <= mtctx->jobs[wJobID].src.start); in ZSTDMT_getInputDataInUse()