Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 87892
b: refs/heads/master
c: 8c703d3
h: refs/heads/master
v: v3
  • Loading branch information
Jonathan Corbet authored and Linus Torvalds committed Mar 28, 2008
1 parent 885becd commit eeeb0d3
Show file tree
Hide file tree
Showing 2 changed files with 8 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: f67e74ca690d9f168cc468b7d714caad492740a6
refs/heads/master: 8c703d35fa91911dd92a18c31a718853f483ad80
7 changes: 7 additions & 0 deletions trunk/include/linux/hardirq.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,13 @@
#define in_softirq() (softirq_count())
#define in_interrupt() (irq_count())

/*
* Are we running in atomic context? WARNING: this macro cannot
* always detect atomic context; in particular, it cannot know about
* held spinlocks in non-preemptible kernels. Thus it should not be
* used in the general case to determine whether sleeping is possible.
* Do not use in_atomic() in driver code.
*/
#define in_atomic() ((preempt_count() & ~PREEMPT_ACTIVE) != 0)

#ifdef CONFIG_PREEMPT
Expand Down

0 comments on commit eeeb0d3

Please sign in to comment.