Commit 2b469919 authored by mseaborn@chromium.org's avatar mseaborn@chromium.org

NaCl: Cleanup: Remove PpapiPluginRegisterDefaultThreadCreator()

This was left over from the transition to the IRT library: it is to
make the audio thread work when libppruntime is linked into the user
nexe (which is no longer supported) rather than into the IRT.

BUG=http://code.google.com/p/nativeclient/issues/detail?id=1691
TEST=run_ppapi_ppb_audio_browser_test (only run on Mac, not Windows or Linux)

Review URL: https://chromiumcodereview.appspot.com/10824171

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@150052 0039d316-1c4b-4281-b951-d872f2087c98
parent b763aba3
...@@ -104,7 +104,6 @@ libppruntime = env.NaClSdkLibrary( ...@@ -104,7 +104,6 @@ libppruntime = env.NaClSdkLibrary(
'plugin_ppp_rpc_server.cc', 'plugin_ppp_rpc_server.cc',
'plugin_resource.cc', 'plugin_resource.cc',
'plugin_resource_tracker.cc', 'plugin_resource_tracker.cc',
'plugin_threading.cc',
'plugin_upcall.cc', 'plugin_upcall.cc',
'ppp_instance_combined.cc', 'ppp_instance_combined.cc',
'proxy_var.cc', 'proxy_var.cc',
......
...@@ -196,7 +196,6 @@ int IrtInit() { ...@@ -196,7 +196,6 @@ int IrtInit() {
int PpapiPluginMain() { int PpapiPluginMain() {
IrtInit(); IrtInit();
PpapiPluginRegisterDefaultThreadCreator();
// Designate this as the main thread for PPB_Core::IsMainThread(). // Designate this as the main thread for PPB_Core::IsMainThread().
ppapi_proxy::PluginCore::MarkMainThread(); ppapi_proxy::PluginCore::MarkMainThread();
if (!NaClSrpcAcceptClientConnection(PppRpcs::srpc_methods)) { if (!NaClSrpcAcceptClientConnection(PppRpcs::srpc_methods)) {
......
/*
* Copyright (c) 2011 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.
*/
#include <pthread.h>
#include "native_client/src/include/nacl_macros.h"
#include "native_client/src/shared/ppapi_proxy/ppruntime.h"
/*
* This provides a default definition that is overridden in the IRT.
* TODO(mseaborn): Remove this when PPAPI is only supported via the IRT.
* See http://code.google.com/p/nativeclient/issues/detail?id=1691
*/
static int thread_create(uintptr_t *tid,
void (*func)(void *thread_argument),
void *thread_argument) {
/*
* We know that newlib and glibc use a small pthread_t type, so we
* do not need to wrap pthread_t values.
*/
NACL_COMPILE_TIME_ASSERT(sizeof(pthread_t) == sizeof(uintptr_t));
return pthread_create((pthread_t *) tid, NULL,
(void *(*)(void *thread_argument)) func,
thread_argument);
}
static int thread_join(uintptr_t tid) {
return pthread_join((pthread_t) tid, NULL);
}
const static struct PP_ThreadFunctions thread_funcs = {
thread_create,
thread_join
};
void PpapiPluginRegisterDefaultThreadCreator() {
PpapiPluginRegisterThreadCreator(&thread_funcs);
}
...@@ -101,7 +101,6 @@ ...@@ -101,7 +101,6 @@
'plugin_ppp_rpc_server.cc', 'plugin_ppp_rpc_server.cc',
'plugin_resource.cc', 'plugin_resource.cc',
'plugin_resource_tracker.cc', 'plugin_resource_tracker.cc',
'plugin_threading.cc',
'plugin_upcall.cc', 'plugin_upcall.cc',
'ppp_instance_combined.cc', 'ppp_instance_combined.cc',
'proxy_var.cc', 'proxy_var.cc',
......
/* /*
* Copyright (c) 2011 The Chromium Authors. All rights reserved. * Copyright (c) 2012 The Chromium Authors. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be * Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file. * found in the LICENSE file.
*/ */
...@@ -23,8 +23,6 @@ int PpapiPluginMain(); ...@@ -23,8 +23,6 @@ int PpapiPluginMain();
void PpapiPluginRegisterThreadCreator( void PpapiPluginRegisterThreadCreator(
const struct PP_ThreadFunctions* new_funcs); const struct PP_ThreadFunctions* new_funcs);
void PpapiPluginRegisterDefaultThreadCreator();
EXTERN_C_END EXTERN_C_END
#endif // NATIVE_CLIENT_SRC_SHARED_PPAPI_PROXY_PPRUNTIME_H_ #endif // NATIVE_CLIENT_SRC_SHARED_PPAPI_PROXY_PPRUNTIME_H_
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment