2015-01-21 21:50:02 +08:00
|
|
|
#include "test.h"
|
2012-12-21 21:26:10 +08:00
|
|
|
|
|
|
|
extern "C" {
|
|
|
|
typedef unsigned long jptr; // NOLINT
|
2013-09-22 07:06:00 +08:00
|
|
|
void __tsan_java_preinit(const char *libjvm_path);
|
2012-12-21 21:26:10 +08:00
|
|
|
void __tsan_java_init(jptr heap_begin, jptr heap_size);
|
|
|
|
int __tsan_java_fini();
|
|
|
|
void __tsan_java_alloc(jptr ptr, jptr size);
|
|
|
|
void __tsan_java_free(jptr ptr, jptr size);
|
2016-12-15 02:20:18 +08:00
|
|
|
jptr __tsan_java_find(jptr *from_ptr, jptr to);
|
2012-12-21 21:26:10 +08:00
|
|
|
void __tsan_java_move(jptr src, jptr dst, jptr size);
|
2014-06-27 08:47:38 +08:00
|
|
|
void __tsan_java_finalize();
|
2012-12-21 21:26:10 +08:00
|
|
|
void __tsan_java_mutex_lock(jptr addr);
|
|
|
|
void __tsan_java_mutex_unlock(jptr addr);
|
|
|
|
void __tsan_java_mutex_read_lock(jptr addr);
|
|
|
|
void __tsan_java_mutex_read_unlock(jptr addr);
|
2013-05-17 20:03:46 +08:00
|
|
|
void __tsan_java_mutex_lock_rec(jptr addr, int rec);
|
|
|
|
int __tsan_java_mutex_unlock_rec(jptr addr);
|
2014-12-22 17:44:56 +08:00
|
|
|
int __tsan_java_acquire(jptr addr);
|
|
|
|
int __tsan_java_release(jptr addr);
|
|
|
|
int __tsan_java_release_store(jptr addr);
|
2015-05-05 16:09:46 +08:00
|
|
|
|
|
|
|
void __tsan_read1_pc(jptr addr, jptr pc);
|
|
|
|
void __tsan_write1_pc(jptr addr, jptr pc);
|
2012-12-21 21:26:10 +08:00
|
|
|
}
|
2015-06-24 21:04:12 +08:00
|
|
|
|
|
|
|
const jptr kExternalPCBit = 1ULL << 60;
|