aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/include
diff options
context:
space:
mode:
authorDiego Ismirlian <dismirlian (at) google's mail.com>2017-07-09 19:45:57 -0300
committerDiego Ismirlian <dismirlian (at) google's mail.com>2017-07-09 19:45:57 -0300
commit65966b4cd4ff8614df295708d589b0cf2d907ace (patch)
tree9af95c5dba5e932682b5d1d22b46b18936856455 /os/hal/include
parent6b7161b90a3572bbb7717d0317306741043528e5 (diff)
downloadChibiOS-Contrib-65966b4cd4ff8614df295708d589b0cf2d907ace.tar.gz
ChibiOS-Contrib-65966b4cd4ff8614df295708d589b0cf2d907ace.tar.bz2
ChibiOS-Contrib-65966b4cd4ff8614df295708d589b0cf2d907ace.zip
USBH: fixed list.h; should now compile with C++
Diffstat (limited to 'os/hal/include')
-rw-r--r--os/hal/include/usbh/list.h34
1 files changed, 17 insertions, 17 deletions
diff --git a/os/hal/include/usbh/list.h b/os/hal/include/usbh/list.h
index 1c09b41..6a02f16 100644
--- a/os/hal/include/usbh/list.h
+++ b/os/hal/include/usbh/list.h
@@ -42,17 +42,17 @@ static inline void INIT_LIST_HEAD(struct list_head *list)
* the prev/next entries already!
*/
#ifndef CONFIG_DEBUG_LIST
-static inline void __list_add(struct list_head *new,
+static inline void __list_add(struct list_head *_new,
struct list_head *prev,
struct list_head *next)
{
- next->prev = new;
- new->next = next;
- new->prev = prev;
- prev->next = new;
+ next->prev = _new;
+ _new->next = next;
+ _new->prev = prev;
+ prev->next = _new;
}
#else
-extern void __list_add(struct list_head *new,
+extern void __list_add(struct list_head *_new,
struct list_head *prev,
struct list_head *next);
#endif
@@ -65,9 +65,9 @@ extern void __list_add(struct list_head *new,
* Insert a new entry after the specified head.
* This is good for implementing stacks.
*/
-static inline void list_add(struct list_head *new, struct list_head *head)
+static inline void list_add(struct list_head *_new, struct list_head *head)
{
- __list_add(new, head, head->next);
+ __list_add(_new, head, head->next);
}
@@ -79,9 +79,9 @@ static inline void list_add(struct list_head *new, struct list_head *head)
* Insert a new entry before the specified head.
* This is useful for implementing queues.
*/
-static inline void list_add_tail(struct list_head *new, struct list_head *head)
+static inline void list_add_tail(struct list_head *_new, struct list_head *head)
{
- __list_add(new, head->prev, head);
+ __list_add(_new, head->prev, head);
}
/*
@@ -452,18 +452,18 @@ static inline void list_splice_tail_init(struct list_head *list,
* If @old was empty, it will be overwritten.
*/
static inline void list_replace(struct list_head *old,
- struct list_head *new)
+ struct list_head *_new)
{
- new->next = old->next;
- new->next->prev = new;
- new->prev = old->prev;
- new->prev->next = new;
+ _new->next = old->next;
+ _new->next->prev = _new;
+ _new->prev = old->prev;
+ _new->prev->next = _new;
}
static inline void list_replace_init(struct list_head *old,
- struct list_head *new)
+ struct list_head *_new)
{
- list_replace(old, new);
+ list_replace(old, _new);
INIT_LIST_HEAD(old);
}