To access the thread local storage API, include the following header file:
#include <parlib/tls.h>
void *main_tls_desc;
__thread void *current_tls_desc;
void *allocate_tls(void);
void *reinit_tls(void *tcb);
void free_tls(void *tcb);
void set_tls_desc(void *tls_desc, uint32_t vcoreid);
void *get_tls_desc(uint32_t vcoreid);