• Home
  • Raw
  • Download

Lines Matching refs:heap

20   Heap* heap = (Heap*)p;  in Thread1()  local
21 pthread_barrier_wait(&heap->barrier_finalizer); in Thread1()
23 __atomic_fetch_add(&heap->wg, 1, __ATOMIC_RELEASE); in Thread1()
24 __atomic_store_n(&heap->finalized, 1, __ATOMIC_RELAXED); in Thread1()
29 Heap* heap = (Heap*)p; in Thread2() local
30 pthread_barrier_wait(&heap->barrier_finalizer); in Thread2()
31 heap->data = 1; in Thread2()
32 __atomic_store_n(&heap->ready, 1, __ATOMIC_RELEASE); in Thread2()
37 Heap* heap = (Heap*)p; in Thread3() local
38 pthread_barrier_wait(&heap->barrier_finalizer); in Thread3()
39 while (__atomic_load_n(&heap->ready, __ATOMIC_ACQUIRE) != 1) in Thread3()
41 while (__atomic_load_n(&heap->finalized, __ATOMIC_RELAXED) != 1) in Thread3()
43 __atomic_fetch_add(&heap->wg, 1, __ATOMIC_RELEASE); in Thread3()
48 Heap* heap = (Heap*)p; in Ballast() local
49 pthread_barrier_wait(&heap->barrier_ballast); in Ballast()
54 Heap* heap = (Heap*)calloc(sizeof(Heap), 2) + 1; in main() local
55 __tsan_java_init((jptr)heap, sizeof(*heap)); in main()
56 __tsan_java_alloc((jptr)heap, sizeof(*heap)); in main()
59 pthread_barrier_init(&heap->barrier_finalizer, 0, 4); in main()
60 pthread_barrier_init(&heap->barrier_ballast, 0, kBallastThreads + 1); in main()
62 pthread_create(&th[0], 0, Thread1, heap); in main()
63 pthread_create(&th[1], 0, Thread2, heap); in main()
66 pthread_create(&ballast[i], 0, Ballast, heap); in main()
67 pthread_create(&th[2], 0, Thread3, heap); in main()
68 pthread_barrier_wait(&heap->barrier_ballast); in main()
71 pthread_barrier_wait(&heap->barrier_finalizer); in main()
72 while (__atomic_load_n(&heap->wg, __ATOMIC_ACQUIRE) != 2) in main()
74 if (heap->data != 1) in main()
78 pthread_barrier_destroy(&heap->barrier_ballast); in main()
79 pthread_barrier_destroy(&heap->barrier_finalizer); in main()
80 __tsan_java_free((jptr)heap, sizeof(*heap)); in main()