Skip to content

Commit

Permalink
hpcgap: ensure GetTLS() is always availble in lldb/gdb
Browse files Browse the repository at this point in the history
  • Loading branch information
fingolfin authored and stevelinton committed Nov 1, 2017
1 parent ab56e74 commit 10cf8d4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,9 @@ VoidFunc debug_func_pointers[] = {
(VoidFunc)FibHash,
(VoidFunc)FillInVersion ,
(VoidFunc)FUNC_HEADER,
#ifdef HPCGAP
(VoidFunc)GetTLS,
#endif
(VoidFunc)GET_ELM_PREC,
(VoidFunc)GET_ELM_RANGE,
(VoidFunc)GET_ELM_STRING,
Expand Down
5 changes: 5 additions & 0 deletions src/hpc/tls.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,11 @@ extern __thread ThreadLocalStorage TLSInstance;

#define realTLS (&TLSInstance)

static inline ThreadLocalStorage *GetTLS(void)
{
return &TLSInstance;
}

#else

#if defined(VERBOSE_GUARDS)
Expand Down

0 comments on commit 10cf8d4

Please sign in to comment.