Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 30740
b: refs/heads/master
c: c723e08
h: refs/heads/master
v: v3
  • Loading branch information
Chuck Ebbert authored and Linus Torvalds committed Jun 28, 2006
1 parent 801a72d commit 5ecca0a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4b89aff930d632be10d557d08d1b60dee7163dbe
refs/heads/master: c723e084606ca1c81e91b80b2c0c44bde7bbc4df
10 changes: 4 additions & 6 deletions trunk/include/asm-i386/thread_info.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,17 +83,15 @@ struct thread_info {
#define init_stack (init_thread_union.stack)


/* how to get the current stack pointer from C */
register unsigned long current_stack_pointer asm("esp") __attribute_used__;

/* how to get the thread information struct from C */
static inline struct thread_info *current_thread_info(void)
{
struct thread_info *ti;
__asm__("andl %%esp,%0; ":"=r" (ti) : "0" (~(THREAD_SIZE - 1)));
return ti;
return (struct thread_info *)(current_stack_pointer & ~(THREAD_SIZE - 1));
}

/* how to get the current stack pointer from C */
register unsigned long current_stack_pointer asm("esp") __attribute_used__;

/* thread information allocation */
#ifdef CONFIG_DEBUG_STACK_USAGE
#define alloc_thread_info(tsk) \
Expand Down

0 comments on commit 5ecca0a

Please sign in to comment.