diff options
author | Stewart Smith <stewart@linux.vnet.ibm.com> | 2015-12-15 15:54:13 +1100 |
---|---|---|
committer | Stewart Smith <stewart@linux.vnet.ibm.com> | 2015-12-15 16:48:06 +1100 |
commit | b0ca9982f06b77967adb7d5fbab91ea98ac64d6f (patch) | |
tree | 44b461f2448a986e7fef775558f974f5e2ee3c11 | |
parent | b6b90c6d854f4392d1eb0b3935d596e00a0f01ce (diff) | |
download | ffs-b0ca9982f06b77967adb7d5fbab91ea98ac64d6f.tar.gz ffs-b0ca9982f06b77967adb7d5fbab91ea98ac64d6f.zip |
remove unused stack.h
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
-rw-r--r-- | clib/queue.h | 1 | ||||
-rw-r--r-- | clib/stack.h | 106 |
2 files changed, 0 insertions, 107 deletions
diff --git a/clib/queue.h b/clib/queue.h index 6e5c028..30ad80c 100644 --- a/clib/queue.h +++ b/clib/queue.h @@ -43,7 +43,6 @@ typedef list_node queue_node; #define queue_init(q) list_init((list *)(q)) #define queue_push(q,n) list_add_tail((list *)(q),(n)) #define queue_pop(q) list_remove_head((list *)(q)) -#define stack_empty(q) list_empty((list *)(q)) #define queue_dump(q,s) list_dump((list *)(q),(s)) #define queue_entry(n, t, m) list_entry((n),(t),(m)) diff --git a/clib/stack.h b/clib/stack.h deleted file mode 100644 index 12a9ea7..0000000 --- a/clib/stack.h +++ /dev/null @@ -1,106 +0,0 @@ -/* IBM_PROLOG_BEGIN_TAG */ -/* This is an automatically generated prolog. */ -/* */ -/* $Source: clib/stack.h $ */ -/* */ -/* OpenPOWER FFS Project */ -/* */ -/* Contributors Listed Below - COPYRIGHT 2014,2015 */ -/* [+] International Business Machines Corp. */ -/* */ -/* */ -/* Licensed under the Apache License, Version 2.0 (the "License"); */ -/* you may not use this file except in compliance with the License. */ -/* You may obtain a copy of the License at */ -/* */ -/* http://www.apache.org/licenses/LICENSE-2.0 */ -/* */ -/* Unless required by applicable law or agreed to in writing, software */ -/* distributed under the License is distributed on an "AS IS" BASIS, */ -/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or */ -/* implied. See the License for the specific language governing */ -/* permissions and limitations under the License. */ -/* */ -/* IBM_PROLOG_END_TAG */ - -/*! - * @file stack.h - * @brief stack container - * @details - * A stack is a data structure (container) used for collecting a sequence of elements. - * stack allow for efficient insertion, removal and retreival of elements. - * - * @details For example, - * @code - * #include <clib/stack.h> - * #include <clib/stack_iter.h> - * - * int main(const int argc, const char * argv[]) { - * typedef struct { - * stack_node_t node; - * int i; - * float f; - * } data_t; - * - * slab_t s; - * slab_init(&s, sizeof(data_t), 0); - * - * stack_t a; - * stack_init(&a); - * - * int i; - * for (i=0; i<10; i++) { - * data_t * d = (data_t *)slab_alloc(&s); - * - * d->i = i; - * d->f = (float)i; - * - * stack_add_tail(&l, &d->node); - * } - * - * data_t * d; - * stack_for_each(&l, d, node) { - * printf("i: %d f: %f\n", d->i, d->f); - * } - * - * stack_dump(&l, stdout); - * slab_delete(&s); - * - * return 0; - * } - * @endcode - * @author Shaun Wetzstein <shaun@us.ibm.com> - * @date 2010-2011 - */ - -#ifndef __STACK_H__ -#define __STACK_H__ - -#include "list.h" -#include "type.h" - -typedef list stack; -typedef list_node stack_node; - -#define stack_init(s) list_init((list *)(s)) -#define stack_push(s,n) list_add_tail((list *)(s),(n)) -#define stack_pop(s) list_remove_tail((list *)(s)) -#define stack_empty(s) list_empty((list *)(s)) -#define stack_dump(s,o) list_dump((list *)(s),(o)) - -#define stack_entry(n, t, m) list_entry((n),(t),(m)) -#define stack_top(s) list_head((list *)(s)) -#define stack_bottom(s) list_tail((list *)(s)) - -#define stack_for_each(s, i, m) \ - for (i = container_of_var(s->node.next, i, m); \ - &i->m != &(s)->node; \ - i = container_of_var(i->m.next, i, m)) - -#define stack_for_each_safe(s, i, n, m) \ - for (i = container_of_var((s)->node.next, i, m), \ - n = container_of_var(i->m.next, i, m); \ - &i->m != &(s)->node; \ - i = n, n = container_of_var(i->m.next, i, m)) - -#endif /* __STACK_H__ */ |