Browse Source

Don't bother poisoning lists; it costs code size.

tags/v0.9.3
Michael Brown 19 years ago
parent
commit
5423f876fb
1 changed files with 3 additions and 13 deletions
  1. 3
    13
      src/include/gpxe/list.h

+ 3
- 13
src/include/gpxe/list.h View File

1
-#ifndef _LIST_H
2
-#define _LIST_H
1
+#ifndef _GPXE_LIST_H
2
+#define _GPXE_LIST_H
3
 
3
 
4
 /** @file
4
 /** @file
5
  *
5
  *
11
 
11
 
12
 #include <stddef.h>
12
 #include <stddef.h>
13
 
13
 
14
-/*
15
- * These are non-NULL pointers that will result in page faults
16
- * under normal circumstances, used to verify that nobody uses
17
- * non-initialized list entries.
18
- */
19
-#define LIST_POISON1 ( ( void * ) 0x00100100 )
20
-#define LIST_POISON2 ( ( void * ) 0x00200200 )
21
-
22
 /*
14
 /*
23
  * Simple doubly linked list implementation.
15
  * Simple doubly linked list implementation.
24
  *
16
  *
108
  */
100
  */
109
 static inline void list_del ( struct list_head *entry ) {
101
 static inline void list_del ( struct list_head *entry ) {
110
 	__list_del ( entry->prev, entry->next );
102
 	__list_del ( entry->prev, entry->next );
111
-	entry->next = LIST_POISON1;
112
-	entry->prev = LIST_POISON2;
113
 }
103
 }
114
 
104
 
115
 /**
105
 /**
152
 	      &pos->member != (head);					      \
142
 	      &pos->member != (head);					      \
153
 	      pos = list_entry ( pos->member.next, typeof ( *pos ), member ) )
143
 	      pos = list_entry ( pos->member.next, typeof ( *pos ), member ) )
154
 
144
 
155
-#endif /* _LIST_H */
145
+#endif /* _GPXE_LIST_H */

Loading…
Cancel
Save