Lines Matching refs:type

126 void bioCreateBackgroundJob(int type, void *arg1, void *arg2, void *arg3) {  in bioCreateBackgroundJob()  argument
133 pthread_mutex_lock(&bio_mutex[type]); in bioCreateBackgroundJob()
134 listAddNodeTail(bio_jobs[type],job); in bioCreateBackgroundJob()
135 bio_pending[type]++; in bioCreateBackgroundJob()
136 pthread_cond_signal(&bio_condvar[type]); in bioCreateBackgroundJob()
137 pthread_mutex_unlock(&bio_mutex[type]); in bioCreateBackgroundJob()
142 unsigned long type = (unsigned long) arg; in bioProcessBackgroundJobs() local
146 if (type >= BIO_NUM_OPS) { in bioProcessBackgroundJobs()
148 "Warning: bio thread started with wrong type %lu",type); in bioProcessBackgroundJobs()
157 pthread_mutex_lock(&bio_mutex[type]); in bioProcessBackgroundJobs()
170 if (listLength(bio_jobs[type]) == 0) { in bioProcessBackgroundJobs()
171 pthread_cond_wait(&bio_condvar[type],&bio_mutex[type]); in bioProcessBackgroundJobs()
175 ln = listFirst(bio_jobs[type]); in bioProcessBackgroundJobs()
179 pthread_mutex_unlock(&bio_mutex[type]); in bioProcessBackgroundJobs()
182 if (type == BIO_CLOSE_FILE) { in bioProcessBackgroundJobs()
184 } else if (type == BIO_AOF_FSYNC) { in bioProcessBackgroundJobs()
193 pthread_mutex_lock(&bio_mutex[type]); in bioProcessBackgroundJobs()
194 listDelNode(bio_jobs[type],ln); in bioProcessBackgroundJobs()
195 bio_pending[type]--; in bioProcessBackgroundJobs()
200 unsigned long long bioPendingJobsOfType(int type) { in bioPendingJobsOfType() argument
202 pthread_mutex_lock(&bio_mutex[type]); in bioPendingJobsOfType()
203 val = bio_pending[type]; in bioPendingJobsOfType()
204 pthread_mutex_unlock(&bio_mutex[type]); in bioPendingJobsOfType()