diff options
author | Ed Schouten <ed@FreeBSD.org> | 2016-08-24 10:13:18 +0000 |
---|---|---|
committer | Ed Schouten <ed@FreeBSD.org> | 2016-08-24 10:13:18 +0000 |
commit | 48734c99d34ffc75c5352169f29480fd90582903 (patch) | |
tree | f3c3fb0fee1e6909855e0f071f158113f75b1f39 | |
parent | 647672e21f689d180185fa9c068c974f7418b446 (diff) | |
download | src-48734c99d34ffc75c5352169f29480fd90582903.tar.gz src-48734c99d34ffc75c5352169f29480fd90582903.zip |
Convert pointers obtained from the threadattr_t structure with TO_PTR().
In all of these source files, the userspace pointer size corresponds
with the kernelspace pointer size, meaning that casting directly works.
As I'm planning on making 32-bit execution on 64-bit systems work as
well, use TO_PTR() here as well, so that the changes between source
files remain minimal.
Notes
Notes:
svn path=/head/; revision=304742
-rw-r--r-- | sys/amd64/cloudabi64/cloudabi64_sysvec.c | 4 | ||||
-rw-r--r-- | sys/arm64/cloudabi64/cloudabi64_sysvec.c | 4 | ||||
-rw-r--r-- | sys/i386/cloudabi32/cloudabi32_sysvec.c | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/sys/amd64/cloudabi64/cloudabi64_sysvec.c b/sys/amd64/cloudabi64/cloudabi64_sysvec.c index cefdef983238..f1b38630c0d5 100644 --- a/sys/amd64/cloudabi64/cloudabi64_sysvec.c +++ b/sys/amd64/cloudabi64/cloudabi64_sysvec.c @@ -171,9 +171,9 @@ cloudabi64_thread_setregs(struct thread *td, return (error); /* Perform standard register initialization. */ - stack.ss_sp = (void *)attr->stack; + stack.ss_sp = TO_PTR(attr->stack); stack.ss_size = tcbptr - attr->stack; - cpu_set_upcall(td, (void *)attr->entry_point, NULL, &stack); + cpu_set_upcall(td, TO_PTR(attr->entry_point), NULL, &stack); /* * Pass in the thread ID of the new thread and the argument diff --git a/sys/arm64/cloudabi64/cloudabi64_sysvec.c b/sys/arm64/cloudabi64/cloudabi64_sysvec.c index ebcb54e1a867..79b1046ddc95 100644 --- a/sys/arm64/cloudabi64/cloudabi64_sysvec.c +++ b/sys/arm64/cloudabi64/cloudabi64_sysvec.c @@ -139,9 +139,9 @@ cloudabi64_thread_setregs(struct thread *td, stack_t stack; /* Perform standard register initialization. */ - stack.ss_sp = (void *)attr->stack; + stack.ss_sp = TO_PTR(attr->stack); stack.ss_size = attr->stack_size; - cpu_set_upcall(td, (void *)attr->entry_point, NULL, &stack); + cpu_set_upcall(td, TO_PTR(attr->entry_point), NULL, &stack); /* * Pass in the thread ID of the new thread and the argument diff --git a/sys/i386/cloudabi32/cloudabi32_sysvec.c b/sys/i386/cloudabi32/cloudabi32_sysvec.c index 4f2358ca7ef7..1ecd8d52df89 100644 --- a/sys/i386/cloudabi32/cloudabi32_sysvec.c +++ b/sys/i386/cloudabi32/cloudabi32_sysvec.c @@ -155,9 +155,9 @@ cloudabi32_thread_setregs(struct thread *td, int error; /* Perform standard register initialization. */ - stack.ss_sp = (void *)attr->stack; + stack.ss_sp = TO_PTR(attr->stack); stack.ss_size = attr->stack_size - sizeof(args); - cpu_set_upcall(td, (void *)attr->entry_point, NULL, &stack); + cpu_set_upcall(td, TO_PTR(attr->entry_point), NULL, &stack); /* * Copy the arguments for the thread entry point onto the stack |