Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(31)

Unified Diff: src/trusted/generic_container/container_list.h

Issue 10905317: Generic containers moved into a separate module (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: Rebased with master. Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/trusted/generic_container/container_list.h
diff --git a/src/trusted/generic_container/container_list.h b/src/trusted/generic_container/container_list.h
new file mode 100644
index 0000000000000000000000000000000000000000..1d9a984f4799fce34bfa9cd3324b89a2d5b34a52
--- /dev/null
+++ b/src/trusted/generic_container/container_list.h
@@ -0,0 +1,51 @@
+/*
+ * Copyright 2012 The Native Client Authors. All rights reserved.
+ * Use of this source code is governed by a BSD-style license that can
+ * be found in the LICENSE file.
+ */
+
+#ifndef NATIVE_CLIENT_SRC_TRUSTED_GENERIC_CONTAINER_CONTAINER_LIST_H_
+#define NATIVE_CLIENT_SRC_TRUSTED_GENERIC_CONTAINER_CONTAINER_LIST_H_
+
+#include "native_client/src/include/nacl_base.h"
+#include "native_client/src/include/portability.h"
+
+#include "native_client/src/trusted/generic_container/container.h"
+
+EXTERN_C_BEGIN
+
+struct NaClItemList {
+ struct NaClItemList *next;
+ void *datum; /* dynamically allocated, pod */
+};
+
+struct NaClContainerList {
+ struct NaClContainer base;
+ struct NaClCmpFunctor *cmp_functor;
+ struct NaClItemList *head;
+};
+
+int NaClContainerListCtor(struct NaClContainerList *clp,
+ struct NaClCmpFunctor *cmp_functor);
+
+int NaClContainerListInsert(struct NaClContainer *base_pointer,
+ void *obj);
+
+struct NaClContainerIter *NaClContainerListFind(
+ struct NaClContainer *base_pointer,
+ void *key,
+ struct NaClContainerIter *out);
+
+void NaClContainerListDtor(struct NaClContainer *vself);
+
+struct NaClContainerListIter {
+ struct NaClContainerIter base;
+ struct NaClItemList **cur;
+};
+
+int NaClContainerListIterCtor(struct NaClContainer *vself,
+ struct NaClContainerIter *viter);
+
+EXTERN_C_END
+
+#endif /* NATIVE_CLIENT_SRC_TRUSTED_GENERIC_CONTAINER_CONTAINER_LIST_H_ */
« no previous file with comments | « src/trusted/generic_container/container_hash_table.c ('k') | src/trusted/generic_container/container_list.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698