Skip to content

Commit

Permalink
Merge branch 'semaphore-for-linus' of git://git.kernel.org/pub/scm/li…
Browse files Browse the repository at this point in the history
…nux/kernel/git/tip/linux-2.6-tip

* 'semaphore-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  semaphore: Add DEFINE_SEMAPHORE
  • Loading branch information
Linus Torvalds committed Sep 8, 2010
2 parents 1faa6ec + febc88c commit 2c20130
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions include/linux/semaphore.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ struct semaphore {
.wait_list = LIST_HEAD_INIT((name).wait_list), \
}

#define DEFINE_SEMAPHORE(name) \
struct semaphore name = __SEMAPHORE_INITIALIZER(name, 1)

#define DECLARE_MUTEX(name) \
struct semaphore name = __SEMAPHORE_INITIALIZER(name, 1)

Expand Down

0 comments on commit 2c20130

Please sign in to comment.