summaryrefslogtreecommitdiff
path: root/libthreads/i386
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2007-03-03 23:57:37 +0000
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2007-03-03 23:57:37 +0000
commit780a7bfa86d4a620f790c6bc400ce10b845dce60 (patch)
tree89a0790b5d7d31ceb8f2584836fa26c522acdb63 /libthreads/i386
parent40b6d5b9c29fbe64b4d11cf5db19c18011152ae0 (diff)
2006-03-04 Samuel Thibault <samuel.thibault@ens-lyon.org>
* libpthread/sysdeps/i386/machine-sp.h (thread_stack_pointer): Optimize esp read. * libpthread/i386/cthreads.h (cthread_sp): Likewise.
Diffstat (limited to 'libthreads/i386')
-rw-r--r--libthreads/i386/cthreads.h20
1 files changed, 16 insertions, 4 deletions
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 <roland@frob.com>
+ *
+ * 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__ */