Skip to content

Commit

Permalink
Remove old POSIX TLS APIs
Browse files Browse the repository at this point in the history
We have now switched to using fast TLS support, so this old POSIX
get/set_specific support for tracking GC roots in TLS is no longer
required.
  • Loading branch information
jacob-hughes committed Aug 21, 2024
1 parent 0d054f2 commit 773862b
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 17 deletions.
12 changes: 0 additions & 12 deletions alloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1861,15 +1861,3 @@ GC_INNER ptr_t GC_allocobj(size_t lg, int k)
GC_fail_count = 0;
return (ptr_t)(*flh);
}

STATIC __thread void* tls_rootset = NULL;

GC_INNER void GC_init_tls_rootset(void * rootset)
{
tls_rootset = rootset;
}

GC_INNER void* GC_tls_rootset()
{
return tls_rootset;
}
3 changes: 0 additions & 3 deletions include/gc/gc.h
Original file line number Diff line number Diff line change
Expand Up @@ -2358,7 +2358,4 @@ GC_API void GC_CALL GC_win32_free_heap(void);
} /* extern "C" */
#endif

GC_API void GC_init_tls_rootset(void * rootset);
GC_API void * GC_tls_rootset();

#endif /* GC_H */
2 changes: 0 additions & 2 deletions pthread_stop_world.c
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,6 @@ STATIC void GC_suspend_handler_inner(ptr_t dummy, void *context)
}
crtn = me -> crtn;
GC_store_stack_ptr(crtn);
crtn -> tls_rootset = GC_tls_rootset();
get_thread_local_roots(&tlr);
crtn -> compiler_thread_roots = tlr;

Expand Down Expand Up @@ -834,7 +833,6 @@ GC_INNER void GC_push_all_stacks(void)
if (me != NULL) {
struct GC_ThreadLocalRoots tlr;
get_thread_local_roots(&tlr);
me -> crtn -> tls_rootset = GC_tls_rootset();
me -> crtn -> compiler_thread_roots = tlr;
}

Expand Down

0 comments on commit 773862b

Please sign in to comment.