From 780a7bfa86d4a620f790c6bc400ce10b845dce60 Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Sat, 3 Mar 2007 23:57:37 +0000 Subject: 2006-03-04 Samuel Thibault * libpthread/sysdeps/i386/machine-sp.h (thread_stack_pointer): Optimize esp read. * libpthread/i386/cthreads.h (cthread_sp): Likewise. --- libthreads/i386/cthreads.h | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) (limited to 'libthreads/i386') diff --git a/libthreads/i386/cthreads.h b/libthreads/i386/cthreads.h index 643e7350..d7202df6 100644 --- a/libthreads/i386/cthreads.h +++ b/libthreads/i386/cthreads.h @@ -25,7 +25,21 @@ */ /* * HISTORY - * $Log: cthreads.h,v $ + * $Log: cthreads.h,v $ + * Revision 1.2 2002/05/27 02:50:10 roland + * 2002-05-26 Roland McGrath + * + * Changes merged from CMU MK83a version: + * * cthreads.h, options.h: Various cleanups. + * * call.c, cthread_data.c, sync.c, mig_support.c: Likewise. + * * i386/cthreads.h, i386/thread.c, i386/lock.s: Likewise. + * * cthread_internals.h: Add decls for internal functions. + * (struct cproc): Use vm_offset_t for stack_base and stack_size members. + * Use natural_t for context member. + * * cprocs.c: Use prototypes for all defns. + * * cthreads.c: Likewise. + * (cthread_exit): Cast any_t to integer_t before int. + * * Revision 2.9 93/01/24 13:24:58 danner * Move ! in spin_try_lock to give the compiler * a fighting chance. @@ -88,9 +102,7 @@ typedef volatile int spin_lock_t; _r__; })) #define cthread_sp() \ - ({ int _sp__; \ - __asm__("movl %%esp, %0" \ - : "=g" (_sp__) ); \ + ({ register int _sp__ asm("esp"); \ _sp__; }) #endif /* __GNUC__ */ -- cgit v1.2.3