summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--libthreads/i386/cthreads.h20
2 files changed, 22 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 9c492c23..d10eb2d1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+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.
+
2006-01-20 Samuel Thibault <samuel.thibault@ens-lyon.org>
Do not let other libraries (like libX11) override libpthread's
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__ */