Lines Matching refs:tid
202 static inline unsigned int compute_store_pattern(unsigned int tid, in compute_store_pattern() argument
207 char *start = compute_chunk_start_addr(tid); in compute_store_pattern()
210 ret += (tid & THREAD_ID_MASK) << THREAD_ID_SHIFT; in compute_store_pattern()
257 static inline void start_verification_log(unsigned int tid, in start_verification_log() argument
266 char *chunk_start = compute_chunk_start_addr(tid); in start_verification_log()
269 sprintf(logfile, logfilename, tid); in start_verification_log()
279 fp[tid] = f; in start_verification_log()
283 fprintf(f, "Thread id = %02d\n", tid); in start_verification_log()
292 static inline void log_anamoly(unsigned int tid, unsigned int *addr, in log_anamoly() argument
295 FILE *f = fp[tid]; in log_anamoly()
298 tid, (unsigned long)addr, expected, observed); in log_anamoly()
299 fprintf(f, "Thread %02d: Expected Thread id = %02d\n", tid, extract_tid(expected)); in log_anamoly()
300 fprintf(f, "Thread %02d: Observed Thread id = %02d\n", tid, extract_tid(observed)); in log_anamoly()
301 fprintf(f, "Thread %02d: Expected Word offset = %03d\n", tid, extract_word_offset(expected)); in log_anamoly()
302 fprintf(f, "Thread %02d: Observed Word offset = %03d\n", tid, extract_word_offset(observed)); in log_anamoly()
303 fprintf(f, "Thread %02d: Expected sweep-id = 0x%x\n", tid, extract_sweep_id(expected)); in log_anamoly()
304 fprintf(f, "Thread %02d: Observed sweep-id = 0x%x\n", tid, extract_sweep_id(observed)); in log_anamoly()
308 static inline void end_verification_log(unsigned int tid, unsigned nr_anamolies) in end_verification_log() argument
310 FILE *f = fp[tid]; in end_verification_log()
322 sprintf(logfile, logfilename, tid); in end_verification_log()
328 tid, nr_anamolies, path); in end_verification_log()
358 static void verify_chunk(unsigned int tid, unsigned int *next_store_addr, in verify_chunk() argument
366 char *chunk_start = compute_chunk_start_addr(tid); in verify_chunk()
370 start_verification_log(tid, next_store_addr, in verify_chunk()
384 expected = compute_store_pattern(tid, iter_ptr, expected_sweep_id); in verify_chunk()
391 log_anamoly(tid, iter_ptr, expected, observed); in verify_chunk()
395 end_verification_log(tid, nr_anamolies); in verify_chunk()
461 unsigned int tid = *((unsigned int *)arg); in rim_fn() local
464 char *chunk_start = compute_chunk_start_addr(tid); in rim_fn()
489 *pattern_ptr = compute_store_pattern(tid, w_ptr, cur_sweep_id); in rim_fn()
507 old_pattern = compute_store_pattern(tid, w_ptr, prev_sweep_id); in rim_fn()
540 verify_chunk(tid, w_ptr, cur_sweep_id, prev_sweep_id); in rim_fn()
549 *pattern_ptr = compute_store_pattern(tid, w_ptr, cur_sweep_id); in rim_fn()