Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 108473
b: refs/heads/master
c: 9bdeb7b
h: refs/heads/master
i:
  108471: 95e80fe
v: v3
  • Loading branch information
Huang Ying authored and Linus Torvalds committed Aug 15, 2008
1 parent 32903a3 commit a66d552
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 73bd9c72a29be1e8de008186eea55d333a938804
refs/heads/master: 9bdeb7b5d34f197dea7859d24475943395ffea5e
21 changes: 21 additions & 0 deletions trunk/include/linux/ftrace.h
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,27 @@ static inline void tracer_disable(void)
#endif
}

/* Ftrace disable/restore without lock. Some synchronization mechanism
* must be used to prevent ftrace_enabled to be changed between
* disable/restore. */
static inline int __ftrace_enabled_save(void)
{
#ifdef CONFIG_FTRACE
int saved_ftrace_enabled = ftrace_enabled;
ftrace_enabled = 0;
return saved_ftrace_enabled;
#else
return 0;
#endif
}

static inline void __ftrace_enabled_restore(int enabled)
{
#ifdef CONFIG_FTRACE
ftrace_enabled = enabled;
#endif
}

#ifdef CONFIG_FRAME_POINTER
/* TODO: need to fix this for ARM */
# define CALLER_ADDR0 ((unsigned long)__builtin_return_address(0))
Expand Down

0 comments on commit a66d552

Please sign in to comment.