Skip to content

Commit

Permalink
move kernel-doc comment for might_sleep directly before its defining …
Browse files Browse the repository at this point in the history
…block

Signed-off-by: Uwe Kleine-König <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Randy Dunlap <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Uwe Kleine-König authored and torvalds committed Aug 12, 2008
1 parent 29a6d39 commit 070cb06
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions include/linux/kernel.h
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,13 @@ struct completion;
struct pt_regs;
struct user;

#ifdef CONFIG_PREEMPT_VOLUNTARY
extern int _cond_resched(void);
# define might_resched() _cond_resched()
#else
# define might_resched() do { } while (0)
#endif

/**
* might_sleep - annotation for functions that can sleep
*
Expand All @@ -118,13 +125,6 @@ struct user;
* be bitten later when the calling function happens to sleep when it is not
* supposed to.
*/
#ifdef CONFIG_PREEMPT_VOLUNTARY
extern int _cond_resched(void);
# define might_resched() _cond_resched()
#else
# define might_resched() do { } while (0)
#endif

#ifdef CONFIG_DEBUG_SPINLOCK_SLEEP
void __might_sleep(char *file, int line);
# define might_sleep() \
Expand Down

0 comments on commit 070cb06

Please sign in to comment.