Lines Matching refs:jobID
564 range_t src, unsigned jobID) in ZSTDMT_serialState_update() argument
568 while (serialState->nextJobID < jobID) { in ZSTDMT_serialState_update()
573 if (serialState->nextJobID == jobID) { in ZSTDMT_serialState_update()
612 unsigned jobID, size_t cSize) in ZSTDMT_serialState_ensureFinished() argument
615 if (serialState->nextJobID <= jobID) { in ZSTDMT_serialState_ensureFinished()
617 DEBUGLOG(5, "Skipping past job %u because of error", jobID); in ZSTDMT_serialState_ensureFinished()
618 serialState->nextJobID = jobID + 1; in ZSTDMT_serialState_ensureFinished()
649 unsigned jobID; /* set by mtctx, then read by worker => no barrier */ member
689 if (job->jobID != 0) jobParams.fParams.checksumFlag = 0; in ZSTDMT_compressionJob()
719 ZSTDMT_serialState_update(job->serial, cctx, rawSeqStore, job->src, job->jobID); in ZSTDMT_compressionJob()
774 ZSTDMT_serialState_ensureFinished(job->serial, job->jobID, job->cSize); in ZSTDMT_compressionJob()
977 unsigned jobID; in ZSTDMT_releaseAllJobResources() local
979 for (jobID=0; jobID <= mtctx->jobIDMask; jobID++) { in ZSTDMT_releaseAllJobResources()
981 ZSTD_pthread_mutex_t const mutex = mtctx->jobs[jobID].job_mutex; in ZSTDMT_releaseAllJobResources()
982 ZSTD_pthread_cond_t const cond = mtctx->jobs[jobID].job_cond; in ZSTDMT_releaseAllJobResources()
984 …DEBUGLOG(4, "job%02u: release dst address %08X", jobID, (U32)(size_t)mtctx->jobs[jobID].dstBuff.st… in ZSTDMT_releaseAllJobResources()
985 ZSTDMT_releaseBuffer(mtctx->bufPool, mtctx->jobs[jobID].dstBuff); in ZSTDMT_releaseAllJobResources()
988 ZSTD_memset(&mtctx->jobs[jobID], 0, sizeof(mtctx->jobs[jobID])); in ZSTDMT_releaseAllJobResources()
989 mtctx->jobs[jobID].job_mutex = mutex; in ZSTDMT_releaseAllJobResources()
990 mtctx->jobs[jobID].job_cond = cond; in ZSTDMT_releaseAllJobResources()
1001 unsigned const jobID = mtctx->doneJobID & mtctx->jobIDMask; in ZSTDMT_waitForAllJobsCompleted() local
1002 ZSTD_PTHREAD_MUTEX_LOCK(&mtctx->jobs[jobID].job_mutex); in ZSTDMT_waitForAllJobsCompleted()
1003 while (mtctx->jobs[jobID].consumed < mtctx->jobs[jobID].src.size) { in ZSTDMT_waitForAllJobsCompleted()
1005 ZSTD_pthread_cond_wait(&mtctx->jobs[jobID].job_cond, &mtctx->jobs[jobID].job_mutex); in ZSTDMT_waitForAllJobsCompleted()
1007 ZSTD_pthread_mutex_unlock(&mtctx->jobs[jobID].job_mutex); in ZSTDMT_waitForAllJobsCompleted()
1118 unsigned const jobID = mtctx->doneJobID; in ZSTDMT_toFlushNow() local
1119 assert(jobID <= mtctx->nextJobID); in ZSTDMT_toFlushNow()
1120 if (jobID == mtctx->nextJobID) return 0; /* no active job => nothing to flush */ in ZSTDMT_toFlushNow()
1123 { unsigned const wJobID = jobID & mtctx->jobIDMask; in ZSTDMT_toFlushNow()
1353 unsigned const jobID = mtctx->nextJobID & mtctx->jobIDMask; in ZSTDMT_createCompressionJob() local
1366 mtctx->jobs[jobID].src.start = src; in ZSTDMT_createCompressionJob()
1367 mtctx->jobs[jobID].src.size = srcSize; in ZSTDMT_createCompressionJob()
1369 mtctx->jobs[jobID].prefix = mtctx->inBuff.prefix; in ZSTDMT_createCompressionJob()
1370 mtctx->jobs[jobID].consumed = 0; in ZSTDMT_createCompressionJob()
1371 mtctx->jobs[jobID].cSize = 0; in ZSTDMT_createCompressionJob()
1372 mtctx->jobs[jobID].params = mtctx->params; in ZSTDMT_createCompressionJob()
1373 mtctx->jobs[jobID].cdict = mtctx->nextJobID==0 ? mtctx->cdict : NULL; in ZSTDMT_createCompressionJob()
1374 mtctx->jobs[jobID].fullFrameSize = mtctx->frameContentSize; in ZSTDMT_createCompressionJob()
1375 mtctx->jobs[jobID].dstBuff = g_nullBuffer; in ZSTDMT_createCompressionJob()
1376 mtctx->jobs[jobID].cctxPool = mtctx->cctxPool; in ZSTDMT_createCompressionJob()
1377 mtctx->jobs[jobID].bufPool = mtctx->bufPool; in ZSTDMT_createCompressionJob()
1378 mtctx->jobs[jobID].seqPool = mtctx->seqPool; in ZSTDMT_createCompressionJob()
1379 mtctx->jobs[jobID].serial = &mtctx->serial; in ZSTDMT_createCompressionJob()
1380 mtctx->jobs[jobID].jobID = mtctx->nextJobID; in ZSTDMT_createCompressionJob()
1381 mtctx->jobs[jobID].firstJob = (mtctx->nextJobID==0); in ZSTDMT_createCompressionJob()
1382 mtctx->jobs[jobID].lastJob = endFrame; in ZSTDMT_createCompressionJob()
1383 …mtctx->jobs[jobID].frameChecksumNeeded = mtctx->params.fParams.checksumFlag && endFrame && (mtctx-… in ZSTDMT_createCompressionJob()
1384 mtctx->jobs[jobID].dstFlushed = 0; in ZSTDMT_createCompressionJob()
1407 ZSTDMT_writeLastEmptyBlock(mtctx->jobs + jobID); in ZSTDMT_createCompressionJob()
1415 (U32)mtctx->jobs[jobID].src.size, in ZSTDMT_createCompressionJob()
1416 mtctx->jobs[jobID].lastJob, in ZSTDMT_createCompressionJob()
1418 jobID); in ZSTDMT_createCompressionJob()
1419 if (POOL_tryAdd(mtctx->factory, ZSTDMT_compressionJob, &mtctx->jobs[jobID])) { in ZSTDMT_createCompressionJob()
1531 unsigned jobID; in ZSTDMT_getInputDataInUse() local
1533 for (jobID = firstJobID; jobID < lastJobID; ++jobID) { in ZSTDMT_getInputDataInUse()
1534 unsigned const wJobID = jobID & mtctx->jobIDMask; in ZSTDMT_getInputDataInUse()