diff options
| author | Len Brown <len.brown@intel.com> | 2003-12-17 14:23:14 -0500 |
|---|---|---|
| committer | Len Brown <len.brown@intel.com> | 2003-12-17 14:23:14 -0500 |
| commit | 5f480388e7c5a5ce489f0833e3941a9ddffddf8b (patch) | |
| tree | 3ae4f5202bb09b7fc5dba70ddf6f4f963a9cf219 /include | |
| parent | 7af0f30f680ad417cbc7475bd842e0f1fd511d8b (diff) | |
| parent | 67e9bb60cdf60c3ead23020c96090e722895f47a (diff) | |
Merge intel.com:/home/lenb/bk/linux-2.6.0
into intel.com:/home/lenb/bk/linux-acpi-test-2.6.0
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/blkdev.h | 4 | ||||
| -rw-r--r-- | include/linux/list.h | 12 |
2 files changed, 15 insertions, 1 deletions
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index dcd5911223d0..35e0f0004e87 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h @@ -82,6 +82,8 @@ struct request_list { wait_queue_head_t wait[2]; }; +#define BLK_MAX_CDB 16 + /* * try to put the fields that are referenced together in the same cacheline */ @@ -147,7 +149,7 @@ struct request { * when request is used as a packet command carrier */ unsigned int cmd_len; - unsigned char cmd[16]; + unsigned char cmd[BLK_MAX_CDB]; unsigned int data_len; void *data; diff --git a/include/linux/list.h b/include/linux/list.h index b7d383e6a312..0835011b0ffb 100644 --- a/include/linux/list.h +++ b/include/linux/list.h @@ -208,6 +208,18 @@ static inline int list_empty(const struct list_head *head) return head->next == head; } +/** + * list_empty_careful - tests whether a list is + * empty _and_ checks that no other CPU might be + * in the process of still modifying either member + * @head: the list to test. + */ +static inline int list_empty_careful(const struct list_head *head) +{ + struct list_head *next = head->next; + return (next == head) && (next == head->prev); +} + static inline void __list_splice(struct list_head *list, struct list_head *head) { |
