summaryrefslogtreecommitdiffstats
path: root/ppapi/nacl_irt
diff options
context:
space:
mode:
authormseaborn@chromium.org <mseaborn@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-02-11 03:55:18 +0000
committermseaborn@chromium.org <mseaborn@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-02-11 03:55:18 +0000
commit0ee45cfde322a90bb3369823e9cd6c192abe8070 (patch)
tree4c92cb06fd40e89cf9d459296e590a3f7eb4d74c /ppapi/nacl_irt
parentd96b4b6a5d031fde62fbd9536777fe93967fd48f (diff)
downloadchromium_src-0ee45cfde322a90bb3369823e9cd6c192abe8070.zip
chromium_src-0ee45cfde322a90bb3369823e9cd6c192abe8070.tar.gz
chromium_src-0ee45cfde322a90bb3369823e9cd6c192abe8070.tar.bz2
NaCl: Move irt_ppapi.{c,h} to the Chromium repo from the NaCl repo
This will allow irt_ppapi.{c,h} to be dropped from the NaCl side. Until then, there are two copies, and which copy gets linked in will depend on library search order. This creates a new directory, ppapi/nacl_irt/, for irt_ppapi.h since it defines structs that are part of NaCl's stable ABI. This new directory is therefore similar to ppapi/c/, but covers how PPAPI is hooked up in NaCl. This also avoids any checkdeps problems with #including from ppapi/proxy/. I made the following changes to irt_ppapi.{c,h} when moving them: * Changed "*" spacing to follow Chromium style. * Added a comment for the assignment to "g_is_main_thread". BUG= https://code.google.com/p/nativeclient/issues/detail?id=3787 TEST= tested browser_tests with irt_ppapi.c removed from the NaCl side Review URL: https://codereview.chromium.org/136333013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@250319 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/nacl_irt')
-rw-r--r--ppapi/nacl_irt/irt_ppapi.h41
1 files changed, 41 insertions, 0 deletions
diff --git a/ppapi/nacl_irt/irt_ppapi.h b/ppapi/nacl_irt/irt_ppapi.h
new file mode 100644
index 0000000..23fbabe
--- /dev/null
+++ b/ppapi/nacl_irt/irt_ppapi.h
@@ -0,0 +1,41 @@
+/*
+ * Copyright 2014 The Chromium Authors. All rights reserved.
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+/*
+ * TODO(mseaborn): Change this to match the filename when NaCl's copy
+ * of irt_ppapi.h is removed. For now it is needed to avoid a
+ * duplicate definition.
+ */
+#ifndef NATIVE_CLIENT_SRC_UNTRUSTED_IRT_IRT_PPAPI_H_
+#define NATIVE_CLIENT_SRC_UNTRUSTED_IRT_IRT_PPAPI_H_ 1
+
+#include <stddef.h>
+
+#include "ppapi/c/ppp.h"
+
+struct PP_StartFunctions {
+ int32_t (*PPP_InitializeModule)(PP_Module module_id,
+ PPB_GetInterface get_browser_interface);
+ void (*PPP_ShutdownModule)();
+ const void* (*PPP_GetInterface)(const char* interface_name);
+};
+
+struct PP_ThreadFunctions {
+ /*
+ * This is a cut-down version of pthread_create()/pthread_join().
+ * We omit thread creation attributes and the thread's return value.
+ *
+ * We use uintptr_t as the thread ID type because pthread_t is not
+ * part of the stable ABI; a user thread library might choose an
+ * arbitrary size for its own pthread_t.
+ */
+ int (*thread_create)(uintptr_t* tid,
+ void (*func)(void* thread_argument),
+ void* thread_argument);
+ int (*thread_join)(uintptr_t tid);
+};
+
+#endif