summaryrefslogtreecommitdiff
path: root/sysdeps
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2008-08-03 00:13:13 +0000
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2008-08-03 00:13:13 +0000
commit996cf59d4a6846650b1778f658f60eef3ac41dcf (patch)
tree0e5199ceb0f53cfb8ace4fdee63a7d157a6ba65d /sysdeps
parent65384669214e2025f8d6aa99f5dad71a96f08ac0 (diff)
* sysdeps/mach/hurd/i386/pt-setup.c (stack_setup): Fix cast from
thread to integer. Fix reservation of stack room for initial frame. * sysdeps/l4/hurd/i386/pt-setup.c (stack_setup): Fix reservation of stack room for initial frame.
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/l4/hurd/i386/pt-setup.c2
-rw-r--r--sysdeps/mach/hurd/i386/pt-setup.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/sysdeps/l4/hurd/i386/pt-setup.c b/sysdeps/l4/hurd/i386/pt-setup.c
index 6540ee5b..2b7a3e23 100644
--- a/sysdeps/l4/hurd/i386/pt-setup.c
+++ b/sysdeps/l4/hurd/i386/pt-setup.c
@@ -47,7 +47,7 @@ stack_setup (struct __pthread *thread,
if (start_routine)
{
/* Set up call frame. */
- top -= 2*sizeof(L4_Word_t);
+ top -= 2;
top = (unsigned long) top & ~0xf;
top[1] = (L4_Word_t) arg; /* Argument to START_ROUTINE. */
top[0] = (L4_Word_t) start_routine;
diff --git a/sysdeps/mach/hurd/i386/pt-setup.c b/sysdeps/mach/hurd/i386/pt-setup.c
index 5abbcfcd..ba438d6a 100644
--- a/sysdeps/mach/hurd/i386/pt-setup.c
+++ b/sysdeps/mach/hurd/i386/pt-setup.c
@@ -58,12 +58,12 @@ stack_setup (struct __pthread *thread,
top -= __hurd_threadvar_max;
/* Save the self pointer. */
- top[_HURD_THREADVAR_THREAD] = (void *) thread;
+ top[_HURD_THREADVAR_THREAD] = (uintptr_t) thread;
if (start_routine)
{
/* And then the call frame. */
- top -= 2*sizeof(uintptr_t);
+ top -= 2;
top = (uintptr_t) top & ~0xf;
top[1] = (uintptr_t) arg; /* Argument to START_ROUTINE. */
top[0] = (uintptr_t) start_routine;