Translate the tlsp to the tcb pointer before using as TCB.
On x86_64 both pointer are identical, but in aarch64 the tlsp
points into the last 16 bytes of the TCB.
Signed-off-by: Robert Kuban <robert.kuban@opensynergy.com>
Reviewed-by: Eduard Vintilă <eduard.vintila47@gmail.com>
Reviewed-by: Razvan Virtan <virtanrazvan@gmail.com>
Reviewed-by: Razvan Deaconescu <razvand@unikraft.io>
Approved-by: Razvan Deaconescu <razvand@unikraft.io>
Tested-by: Unikraft CI <monkey@unikraft.io>
GitHub-Closes: #6
tls_area = mem;
ukarch_tls_area_init(tls_area);
- td = (pthread_t) ukarch_tls_tlsp(tls_area);
+ td = (pthread_t) ukarch_tls_tcb_get(ukarch_tls_tlsp(tls_area));
td->dtv = td->dtv_copy = tls_area;
return td;