summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNeal H. Walfield <neal@gnu.org>2008-02-16 15:12:05 +0000
committerThomas Schwinge <tschwinge@gnu.org>2009-04-07 23:14:08 +0200
commit285e9e265d96d9db2b666ba223e28ee213175cd5 (patch)
treef743c6aa55912a777e93965293602d133b61a784
parent53d1f64bb06284e7d458df71bb52c6965bb2a016 (diff)
2008-02-16 Neal H. Walfield <neal@gnu.org>
* sysdeps/l4/hurd/ia32/pt-setup.c (stack_setup): Add correct casts to elide gcc warnings. (__pthread_setup): Likewise.
-rw-r--r--ChangeLog6
-rw-r--r--sysdeps/l4/hurd/ia32/pt-setup.c40
2 files changed, 26 insertions, 20 deletions
diff --git a/ChangeLog b/ChangeLog
index 96758d4..0c3a8cf 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2008-02-16 Neal H. Walfield <neal@gnu.org>
+
+ * sysdeps/l4/hurd/ia32/pt-setup.c (stack_setup): Add correct casts
+ to elide gcc warnings.
+ (__pthread_setup): Likewise.
+
2008-02-13 Neal H. Walfield <neal@gnu.org>
* sysdeps/l4/hurd/pt-thread-alloc.c (__pthread_thread_alloc):
diff --git a/sysdeps/l4/hurd/ia32/pt-setup.c b/sysdeps/l4/hurd/ia32/pt-setup.c
index 9a3812f..f598779 100644
--- a/sysdeps/l4/hurd/ia32/pt-setup.c
+++ b/sysdeps/l4/hurd/ia32/pt-setup.c
@@ -48,15 +48,15 @@
C entry_point
*/
extern uintptr_t _pthread_entry_point;
-__asm__ ("\t\n\
- .globl _pthread_entry_point, __pthread_entry_point\t\n\
-_pthread_entry_point:\t\n\
-__pthread_entry_point:\t\n\
- pushl $0\t\n\
- popf\t\n\
-\t\n\
- xor %ebp, %ebp\t\n\
- ret\t\n");
+__asm__ ("\n\
+ .globl _pthread_entry_point, __pthread_entry_point\n\
+_pthread_entry_point:\n\
+__pthread_entry_point:\n\
+ pushl $0\n\
+ popf\n\
+\n\
+ xor %ebp, %ebp\n\
+ ret\n");
/* Set up the stack for THREAD, such that it appears as if
START_ROUTINE and ARG were passed to the new thread's entry-point.
@@ -67,18 +67,18 @@ stack_setup (struct __pthread *thread,
void *(*start_routine)(void *), void *arg,
void (*entry_point)(void *(*)(void *), void *))
{
- l4_word_t *top;
+ uintptr_t *top;
/* Calculate top of the new stack. */
- top = (l4_word_t *) ((l4_word_t) thread->stackaddr + thread->stacksize);
+ top = (uintptr_t *) ((uintptr_t) thread->stackaddr + thread->stacksize);
if (start_routine)
{
/* Set up call frame. */
- *--top = (l4_word_t) arg; /* Argument to START_ROUTINE. */
- *--top = (l4_word_t) start_routine;
+ *--top = (uintptr_t) arg; /* Argument to START_ROUTINE. */
+ *--top = (uintptr_t) start_routine;
*--top = 0; /* Fake return address. */
- *--top = entry_point;
+ *--top = (uintptr_t) entry_point;
}
return top;
@@ -89,9 +89,9 @@ __pthread_setup (struct __pthread *thread,
void (*entry_point)(void *(*)(void *), void *),
void *(*start_routine)(void *), void *arg)
{
- thread->mcontext.pc = (uintptr_t) &_pthread_entry_point;
- thread->mcontext.sp = (uintptr_t) stack_setup (thread, start_routine, arg,
- entry_point);
+ thread->mcontext.pc = (void *) &_pthread_entry_point;
+ thread->mcontext.sp = (void *) stack_setup (thread, start_routine, arg,
+ entry_point);
if (__pthread_num_threads == 1)
return 0;
@@ -103,10 +103,10 @@ __pthread_setup (struct __pthread *thread,
0, PAGESIZE_LOG2));
/* SP is set to the end of the exception page. */
- exception_page->exception_handler_sp = (l4_word_t) exception_page + PAGESIZE;
+ exception_page->exception_handler_sp = (uintptr_t) exception_page + PAGESIZE;
- exception_page->exception_handler_ip = (l4_word_t) &exception_handler_entry;
- exception_page->exception_handler_end = (l4_word_t) &exception_handler_end;
+ exception_page->exception_handler_ip = (uintptr_t) &exception_handler_entry;
+ exception_page->exception_handler_end = (uintptr_t) &exception_handler_end;
return 0;
}