aboutsummaryrefslogtreecommitdiff
path: root/libbb/llist.c
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2008-06-27 02:52:20 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2008-06-27 02:52:20 +0000
commitdefc1ea34074e7882724c460260d307cdf981a70 (patch)
treefca9b9a5fe243f9c0c76b84824ea2ff92ea8e589 /libbb/llist.c
parent26bc57d8b26425f23f4be974cce7bf35c95c9a1a (diff)
downloadbusybox-w32-defc1ea34074e7882724c460260d307cdf981a70.tar.gz
busybox-w32-defc1ea34074e7882724c460260d307cdf981a70.tar.bz2
busybox-w32-defc1ea34074e7882724c460260d307cdf981a70.zip
*: introduce and use FAST_FUNC: regparm on i386, otherwise no-on
text data bss dec hex filename 808035 611 6868 815514 c719a busybox_old 804472 611 6868 811951 c63af busybox_unstripped
Diffstat (limited to 'libbb/llist.c')
-rw-r--r--libbb/llist.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/libbb/llist.c b/libbb/llist.c
index 4b3971bbe..094c65246 100644
--- a/libbb/llist.c
+++ b/libbb/llist.c
@@ -13,7 +13,7 @@
13#include "libbb.h" 13#include "libbb.h"
14 14
15/* Add data to the start of the linked list. */ 15/* Add data to the start of the linked list. */
16void llist_add_to(llist_t **old_head, void *data) 16void FAST_FUNC llist_add_to(llist_t **old_head, void *data)
17{ 17{
18 llist_t *new_head = xmalloc(sizeof(llist_t)); 18 llist_t *new_head = xmalloc(sizeof(llist_t));
19 19
@@ -23,7 +23,7 @@ void llist_add_to(llist_t **old_head, void *data)
23} 23}
24 24
25/* Add data to the end of the linked list. */ 25/* Add data to the end of the linked list. */
26void llist_add_to_end(llist_t **list_head, void *data) 26void FAST_FUNC llist_add_to_end(llist_t **list_head, void *data)
27{ 27{
28 llist_t *new_item = xmalloc(sizeof(llist_t)); 28 llist_t *new_item = xmalloc(sizeof(llist_t));
29 29
@@ -42,7 +42,7 @@ void llist_add_to_end(llist_t **list_head, void *data)
42} 42}
43 43
44/* Remove first element from the list and return it */ 44/* Remove first element from the list and return it */
45void *llist_pop(llist_t **head) 45void* FAST_FUNC llist_pop(llist_t **head)
46{ 46{
47 void *data, *next; 47 void *data, *next;
48 48
@@ -58,7 +58,7 @@ void *llist_pop(llist_t **head)
58} 58}
59 59
60/* Unlink arbitrary given element from the list */ 60/* Unlink arbitrary given element from the list */
61void llist_unlink(llist_t **head, llist_t *elm) 61void FAST_FUNC llist_unlink(llist_t **head, llist_t *elm)
62{ 62{
63 llist_t *crt; 63 llist_t *crt;
64 64
@@ -80,7 +80,7 @@ void llist_unlink(llist_t **head, llist_t *elm)
80 80
81/* Recursively free all elements in the linked list. If freeit != NULL 81/* Recursively free all elements in the linked list. If freeit != NULL
82 * call it on each datum in the list */ 82 * call it on each datum in the list */
83void llist_free(llist_t *elm, void (*freeit) (void *data)) 83void FAST_FUNC llist_free(llist_t *elm, void (*freeit) (void *data))
84{ 84{
85 while (elm) { 85 while (elm) {
86 void *data = llist_pop(&elm); 86 void *data = llist_pop(&elm);
@@ -92,7 +92,7 @@ void llist_free(llist_t *elm, void (*freeit) (void *data))
92 92
93#ifdef UNUSED 93#ifdef UNUSED
94/* Reverse list order. */ 94/* Reverse list order. */
95llist_t *llist_rev(llist_t *list) 95llist_t* FAST_FUNC llist_rev(llist_t *list)
96{ 96{
97 llist_t *rev = NULL; 97 llist_t *rev = NULL;
98 98