--- /dev/null
+/*
+ * faultd
+ *
+ * Copyright © 2017 Samsung Electronics
+ *
+ * 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.
+ */
+
+#ifndef FAULTD_QUEUE_H
+#define FAULTD_QUEUE_H
+
+#include "list.h"
+
+/*
+ * Simple queue which use list for storing elements
+ */
+
+#define queue_head list_head
+
+#define QUEUE_INIT LIST_INIT
+
+#define INIT_QUEUE_HEAD INIT_LIST_HEAD;
+
+#define queue_append(head, new) list_add_tail(new, head);
+
+#define queue_pop(head, type, member) \
+ list_first_entry_or_null(head, type, member)
+
+#define queue_empty(head) list_empty(head)
+
+#define queue_for_each(pos, head) \
+ list_for_each(pos, head)
+
+#define queue_for_each_safe(pos, n, head) \
+ list_for_each_safe(pos, n, head)
+
+#define queue_for_each_entry(pos, head, member) \
+ list_for_each_entry(pos, head, member)
+
+#define queue_for_each_entry_safe(pos, n, head, member) \
+ list_for_each_entry_safe(pos, n, head, member)
+
+#endif /* FAULTD_QUEUE_H */