mirror of
https://git.FreeBSD.org/src.git
synced 2024-11-24 07:40:52 +00:00
Use TO_PTR() to convert integers to pointers.
For FreeBSD/arm64's cloudabi32 support, I'm going to need a TO_PTR() in this place. Also use it for all of the other source files, so that the difference remains as minimal as possible. MFC after: 2 weeks
This commit is contained in:
parent
7af24ff710
commit
ee13ffbe03
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=326228
@ -86,7 +86,7 @@ cloudabi32_proc_setregs(struct thread *td, struct image_params *imgp,
|
||||
{
|
||||
|
||||
ia32_setregs(td, imgp, stack);
|
||||
(void)cpu_set_user_tls(td, (void *)stack);
|
||||
(void)cpu_set_user_tls(td, TO_PTR(stack));
|
||||
}
|
||||
|
||||
static int
|
||||
|
@ -83,7 +83,7 @@ cloudabi64_proc_setregs(struct thread *td, struct image_params *imgp,
|
||||
regs = td->td_frame;
|
||||
regs->tf_rdi = stack + sizeof(register_t) +
|
||||
roundup(sizeof(cloudabi64_tcb_t), sizeof(register_t));
|
||||
(void)cpu_set_user_tls(td, (void *)stack);
|
||||
(void)cpu_set_user_tls(td, TO_PTR(stack));
|
||||
}
|
||||
|
||||
static int
|
||||
@ -188,7 +188,7 @@ cloudabi64_thread_setregs(struct thread *td,
|
||||
frame->tf_rdi = td->td_tid;
|
||||
frame->tf_rsi = attr->argument;
|
||||
|
||||
return (cpu_set_user_tls(td, (void *)tcbptr));
|
||||
return (cpu_set_user_tls(td, TO_PTR(tcbptr)));
|
||||
}
|
||||
|
||||
static struct sysentvec cloudabi64_elf_sysvec = {
|
||||
|
@ -63,7 +63,7 @@ cloudabi32_proc_setregs(struct thread *td, struct image_params *imgp,
|
||||
regs = td->td_frame;
|
||||
regs->tf_r0 =
|
||||
stack + roundup(sizeof(cloudabi32_tcb_t), sizeof(register_t));
|
||||
(void)cpu_set_user_tls(td, (void *)stack);
|
||||
(void)cpu_set_user_tls(td, TO_PTR(stack));
|
||||
}
|
||||
|
||||
static int
|
||||
|
@ -63,7 +63,7 @@ cloudabi64_proc_setregs(struct thread *td, struct image_params *imgp,
|
||||
regs = td->td_frame;
|
||||
regs->tf_x[0] =
|
||||
stack + roundup(sizeof(cloudabi64_tcb_t), sizeof(register_t));
|
||||
(void)cpu_set_user_tls(td, (void *)stack);
|
||||
(void)cpu_set_user_tls(td, TO_PTR(stack));
|
||||
}
|
||||
|
||||
static int
|
||||
|
@ -81,7 +81,7 @@ cloudabi32_proc_setregs(struct thread *td, struct image_params *imgp,
|
||||
{
|
||||
|
||||
exec_setregs(td, imgp, stack);
|
||||
(void)cpu_set_user_tls(td, (void *)stack);
|
||||
(void)cpu_set_user_tls(td, TO_PTR(stack));
|
||||
}
|
||||
|
||||
static int
|
||||
|
Loading…
Reference in New Issue
Block a user