~ubuntu-branches/ubuntu/trusty/llvm-toolchain-snapshot/trusty-201310232150

« back to all changes in this revision

Viewing changes to compiler-rt/lib/tsan/rtl/tsan_interface_java.cc

  • Committer: Package Import Robot
  • Author(s): Sylvestre Ledru
  • Date: 2013-05-27 15:01:57 UTC
  • mfrom: (0.10.1) (0.9.1) (0.8.1) (0.7.1) (0.6.1) (0.5.2)
  • Revision ID: package-import@ubuntu.com-20130527150157-tdkrsjpuvht7v0qx
Tags: 1:3.4~svn182733-1~exp1
* New snapshot release (3.4 release)
* Add a symlink of libLLVM-3.4.so.1 to usr/lib/llvm-3.4/lib/libLLVM-3.4.so
    to fix make the llvm-config-3.4 --libdir work (Closes: #708677)
  * Various packages rename to allow co installations:
    * libclang1 => libclang1-3.4
    * libclang1-dbg => libclang1-3.4-dbg
    * libclang-dev => libclang-3.4-dev
    * libclang-common-dev => libclang-common-3.4-dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
271
271
  CHECK_GE(addr, jctx->heap_begin);
272
272
  CHECK_LT(addr, jctx->heap_begin + jctx->heap_size);
273
273
 
 
274
  MutexCreate(thr, pc, addr, true, true, true);
274
275
  MutexLock(thr, pc, addr);
275
276
}
276
277
 
291
292
  CHECK_GE(addr, jctx->heap_begin);
292
293
  CHECK_LT(addr, jctx->heap_begin + jctx->heap_size);
293
294
 
 
295
  MutexCreate(thr, pc, addr, true, true, true);
294
296
  MutexReadLock(thr, pc, addr);
295
297
}
296
298
 
303
305
 
304
306
  MutexReadUnlock(thr, pc, addr);
305
307
}
 
308
 
 
309
void __tsan_java_mutex_lock_rec(jptr addr, int rec) {
 
310
  SCOPED_JAVA_FUNC(__tsan_java_mutex_lock_rec);
 
311
  DPrintf("#%d: java_mutex_lock_rec(%p, %d)\n", thr->tid, addr, rec);
 
312
  CHECK_NE(jctx, 0);
 
313
  CHECK_GE(addr, jctx->heap_begin);
 
314
  CHECK_LT(addr, jctx->heap_begin + jctx->heap_size);
 
315
  CHECK_GT(rec, 0);
 
316
 
 
317
  MutexCreate(thr, pc, addr, true, true, true);
 
318
  MutexLock(thr, pc, addr, rec);
 
319
}
 
320
 
 
321
int __tsan_java_mutex_unlock_rec(jptr addr) {
 
322
  SCOPED_JAVA_FUNC(__tsan_java_mutex_unlock_rec);
 
323
  DPrintf("#%d: java_mutex_unlock_rec(%p)\n", thr->tid, addr);
 
324
  CHECK_NE(jctx, 0);
 
325
  CHECK_GE(addr, jctx->heap_begin);
 
326
  CHECK_LT(addr, jctx->heap_begin + jctx->heap_size);
 
327
 
 
328
  return MutexUnlock(thr, pc, addr, true);
 
329
}