Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 91760
b: refs/heads/master
c: c0d1f29
h: refs/heads/master
v: v3
  • Loading branch information
Robert P. J. Day authored and Jesper Juhl committed Apr 21, 2008
1 parent fd7531b commit c9cb866
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 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: dd89db1df98003fadafa711ab8bc497aaf92980a
refs/heads/master: c0d1f29534f2bd6c5992831eb0f648522e9b0204
4 changes: 2 additions & 2 deletions trunk/Documentation/DocBook/kernel-locking.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -854,7 +854,7 @@ The change is shown below, in standard patch format: the
};

-static DEFINE_MUTEX(cache_lock);
+static spinlock_t cache_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(cache_lock);
static LIST_HEAD(cache);
static unsigned int cache_num = 0;
#define MAX_CACHE_SIZE 10
Expand Down Expand Up @@ -1238,7 +1238,7 @@ Here is the "lock-per-object" implementation:
- int popularity;
};

static spinlock_t cache_lock = SPIN_LOCK_UNLOCKED;
static DEFINE_SPINLOCK(cache_lock);
@@ -77,6 +84,7 @@
obj->id = id;
obj->popularity = 0;
Expand Down
2 changes: 1 addition & 1 deletion trunk/Documentation/block/biodoc.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1097,7 +1097,7 @@ lock themselves, if required. Drivers that explicitly used the
io_request_lock for serialization need to be modified accordingly.
Usually it's as easy as adding a global lock:

static spinlock_t my_driver_lock = SPIN_LOCK_UNLOCKED;
static DEFINE_SPINLOCK(my_driver_lock);

and passing the address to that lock to blk_init_queue().

Expand Down
2 changes: 1 addition & 1 deletion trunk/Documentation/cli-sti-removal.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ would execute while the cli()-ed section is executing.

but from now on a more direct method of locking has to be used:

spinlock_t driver_lock = SPIN_LOCK_UNLOCKED;
DEFINE_SPINLOCK(driver_lock);
struct driver_data;

irq_handler (...)
Expand Down

0 comments on commit c9cb866

Please sign in to comment.