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

Unified Diff: src/trusted/generic_container/container.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
« no previous file with comments | « src/trusted/generic_container/build.scons ('k') | src/trusted/generic_container/container_hash_table.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/trusted/generic_container/container.h
diff --git a/src/trusted/service_runtime/generic_container/container.h b/src/trusted/generic_container/container.h
similarity index 52%
rename from src/trusted/service_runtime/generic_container/container.h
rename to src/trusted/generic_container/container.h
index 8880a7036495a293c3eda593c6cb7cb43b58b08a..c8947d780320cae71cb113bd8f8e042f5eb3ad8e 100644
--- a/src/trusted/service_runtime/generic_container/container.h
+++ b/src/trusted/generic_container/container.h
@@ -1,5 +1,5 @@
/*
- * Copyright 2008 The Native Client Authors. All rights reserved.
+ * 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.
*/
@@ -8,12 +8,11 @@
* NaCl Generic containers.
*/
-#ifndef NATIVE_CLIENT_GENERIC_CONTAINER_CONTAINER_H_
-#define NATIVE_CLIENT_GENERIC_CONTAINER_CONTAINER_H_
-
-#include <sys/types.h>
+#ifndef NATIVE_CLIENT_SRC_TRUSTED_GENERIC_CONTAINER_CONTAINER_H_
+#define NATIVE_CLIENT_SRC_TRUSTED_GENERIC_CONTAINER_CONTAINER_H_
#include "native_client/src/include/nacl_base.h"
+#include "native_client/src/include/portability.h"
EXTERN_C_BEGIN
@@ -94,85 +93,6 @@ struct NaClContainerIter {
struct NaClContainerIterVtbl const *vtbl;
};
-/* linked list */
-
-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);
-
-/* hash table */
-
-struct NaClContainerHashTblEntry {
- int flags;
- void *datum;
-};
-
-#define NACL_CHTE_USED (1<<0)
-/* slot occupied, so keep probing */
-
-#define NACL_CHTE_DELETED (1<<1)
-/* slot occupied but deleted, keep probing */
-
-struct NaClContainerHashTbl {
- struct NaClContainer base;
- struct NaClHashFunctor *hash_functor;
- size_t num_buckets;
- size_t num_entries;
- struct NaClContainerHashTblEntry *bucket;
-};
-
-int NaClContainerHashTblCtor(struct NaClContainerHashTbl *self,
- struct NaClHashFunctor *hash_functor,
- size_t num_buckets);
-
-int NaClContainerHashTblInsert(struct NaClContainer *vself,
- void *obj);
-
-struct NaClContainerIter *NaClContainerHashTblFind(
- struct NaClContainer *vself,
- void *key,
- struct NaClContainerIter *out);
-
-void NaClContainerHashTblDtor(struct NaClContainer *vself);
-
-struct NaClContainerHashTblIter {
- struct NaClContainerIter base;
- struct NaClContainerHashTbl *htbl;
- uintptr_t idx;
-};
-
-int NaClContainerHashTblIterCtor(struct NaClContainer *vself,
- struct NaClContainerIter *viter);
-
-
EXTERN_C_END
-#endif
+#endif /* NATIVE_CLIENT_SRC_TRUSTED_GENERIC_CONTAINER_CONTAINER_H_ */
« no previous file with comments | « src/trusted/generic_container/build.scons ('k') | src/trusted/generic_container/container_hash_table.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698