|
@@ -163,9 +163,11 @@ struct thread_info {
|
|
*/
|
|
*/
|
|
#ifndef __ASSEMBLY__
|
|
#ifndef __ASSEMBLY__
|
|
|
|
|
|
-
|
|
|
|
-/* how to get the current stack pointer from C */
|
|
|
|
-register unsigned long current_stack_pointer asm("esp") __used;
|
|
|
|
|
|
+#define current_stack_pointer ({ \
|
|
|
|
+ unsigned long sp; \
|
|
|
|
+ asm("mov %%esp,%0" : "=g" (sp)); \
|
|
|
|
+ sp; \
|
|
|
|
+})
|
|
|
|
|
|
/* how to get the thread information struct from C */
|
|
/* how to get the thread information struct from C */
|
|
static inline struct thread_info *current_thread_info(void)
|
|
static inline struct thread_info *current_thread_info(void)
|