mirror of
https://github.com/opnsense/src.git
synced 2026-04-22 14:49:36 -04: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
5 changed files with 6 additions and 6 deletions
|
|
@ -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 a new issue