Lines Matching refs:tid
201 static inline unsigned int compute_store_pattern(unsigned int tid, in compute_store_pattern() argument
206 char *start = compute_chunk_start_addr(tid); in compute_store_pattern()
209 ret += (tid & THREAD_ID_MASK) << THREAD_ID_SHIFT; in compute_store_pattern()
256 static inline void start_verification_log(unsigned int tid, in start_verification_log() argument
265 char *chunk_start = compute_chunk_start_addr(tid); in start_verification_log()
268 sprintf(logfile, logfilename, tid); in start_verification_log()
278 fp[tid] = f; in start_verification_log()
282 fprintf(f, "Thread id = %02d\n", tid); in start_verification_log()
291 static inline void log_anamoly(unsigned int tid, unsigned int *addr, in log_anamoly() argument
294 FILE *f = fp[tid]; in log_anamoly()
297 tid, (unsigned long)addr, expected, observed); in log_anamoly()
298 fprintf(f, "Thread %02d: Expected Thread id = %02d\n", tid, extract_tid(expected)); in log_anamoly()
299 fprintf(f, "Thread %02d: Observed Thread id = %02d\n", tid, extract_tid(observed)); in log_anamoly()
300 fprintf(f, "Thread %02d: Expected Word offset = %03d\n", tid, extract_word_offset(expected)); in log_anamoly()
301 fprintf(f, "Thread %02d: Observed Word offset = %03d\n", tid, extract_word_offset(observed)); in log_anamoly()
302 fprintf(f, "Thread %02d: Expected sweep-id = 0x%x\n", tid, extract_sweep_id(expected)); in log_anamoly()
303 fprintf(f, "Thread %02d: Observed sweep-id = 0x%x\n", tid, extract_sweep_id(observed)); in log_anamoly()
307 static inline void end_verification_log(unsigned int tid, unsigned nr_anamolies) in end_verification_log() argument
309 FILE *f = fp[tid]; in end_verification_log()
321 sprintf(logfile, logfilename, tid); in end_verification_log()
327 tid, nr_anamolies, path); in end_verification_log()
357 static void verify_chunk(unsigned int tid, unsigned int *next_store_addr, in verify_chunk() argument
365 char *chunk_start = compute_chunk_start_addr(tid); in verify_chunk()
369 start_verification_log(tid, next_store_addr, in verify_chunk()
383 expected = compute_store_pattern(tid, iter_ptr, expected_sweep_id); in verify_chunk()
390 log_anamoly(tid, iter_ptr, expected, observed); in verify_chunk()
394 end_verification_log(tid, nr_anamolies); in verify_chunk()
460 unsigned int tid = *((unsigned int *)arg); in rim_fn() local
463 char *chunk_start = compute_chunk_start_addr(tid); in rim_fn()
488 *pattern_ptr = compute_store_pattern(tid, w_ptr, cur_sweep_id); in rim_fn()
506 old_pattern = compute_store_pattern(tid, w_ptr, prev_sweep_id); in rim_fn()
539 verify_chunk(tid, w_ptr, cur_sweep_id, prev_sweep_id); in rim_fn()
548 *pattern_ptr = compute_store_pattern(tid, w_ptr, cur_sweep_id); in rim_fn()