1
0
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:
Ed Schouten 2017-11-26 14:45:56 +00:00
parent 7af24ff710
commit ee13ffbe03
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=326228
5 changed files with 6 additions and 6 deletions

View File

@ -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

View File

@ -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 = {

View File

@ -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

View File

@ -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

View File

@ -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