Lines Matching refs:tid

198  * Compute the store pattern for a given thread with id @tid, at
201 static inline unsigned int compute_store_pattern(unsigned int tid,
206 char *start = compute_chunk_start_addr(tid);
209 ret += (tid & THREAD_ID_MASK) << THREAD_ID_SHIFT;
256 static inline void start_verification_log(unsigned int tid,
265 char *chunk_start = compute_chunk_start_addr(tid);
268 sprintf(logfile, logfilename, tid);
278 fp[tid] = f;
282 fprintf(f, "Thread id = %02d\n", tid);
291 static inline void log_anamoly(unsigned int tid, unsigned int *addr,
294 FILE *f = fp[tid];
297 tid, (unsigned long)addr, expected, observed);
298 fprintf(f, "Thread %02d: Expected Thread id = %02d\n", tid, extract_tid(expected));
299 fprintf(f, "Thread %02d: Observed Thread id = %02d\n", tid, extract_tid(observed));
300 fprintf(f, "Thread %02d: Expected Word offset = %03d\n", tid, extract_word_offset(expected));
301 fprintf(f, "Thread %02d: Observed Word offset = %03d\n", tid, extract_word_offset(observed));
302 fprintf(f, "Thread %02d: Expected sweep-id = 0x%x\n", tid, extract_sweep_id(expected));
303 fprintf(f, "Thread %02d: Observed sweep-id = 0x%x\n", tid, extract_sweep_id(observed));
307 static inline void end_verification_log(unsigned int tid, unsigned nr_anamolies)
309 FILE *f = fp[tid];
321 sprintf(logfile, logfilename, tid);
327 tid, nr_anamolies, path);
336 * Suppose a thread identified with @tid was about to store (but not
341 * Thread @tid has already performed a store as part of its current
344 * | tid | word_offset(addr) | cur_sweep_id |
347 * Since Thread @tid is yet to perform stores on address
351 * | tid | word_offset(addr) | prev_sweep_id |
357 static void verify_chunk(unsigned int tid, unsigned int *next_store_addr,
365 char *chunk_start = compute_chunk_start_addr(tid);
369 start_verification_log(tid, next_store_addr,
383 expected = compute_store_pattern(tid, iter_ptr, expected_sweep_id);
390 log_anamoly(tid, iter_ptr, expected, observed);
394 end_verification_log(tid, nr_anamolies);
460 unsigned int tid = *((unsigned int *)arg);
463 char *chunk_start = compute_chunk_start_addr(tid);
481 * | tid | word_offset(addr) | 0 |
488 *pattern_ptr = compute_store_pattern(tid, w_ptr, cur_sweep_id);
506 old_pattern = compute_store_pattern(tid, w_ptr, prev_sweep_id);
539 verify_chunk(tid, w_ptr, cur_sweep_id, prev_sweep_id);
548 *pattern_ptr = compute_store_pattern(tid, w_ptr, cur_sweep_id);