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

Unified Diff: src/nonsfi/linux/linux_pthread_private.h

Issue 1222753005: Non-SFI mode: Use clone() instead of pthread_create() (Closed) Base URL: https://chromium.googlesource.com/native_client/src/native_client.git@master
Patch Set: Addressed feedback Created 5 years, 5 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/nonsfi/irt/irt_interfaces.c ('k') | src/nonsfi/linux/linux_pthread_private.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/nonsfi/linux/linux_pthread_private.h
diff --git a/src/nonsfi/linux/linux_pthread_private.h b/src/nonsfi/linux/linux_pthread_private.h
new file mode 100644
index 0000000000000000000000000000000000000000..b496aa024fc76f3f1c70e3cd2f2dfdd194cabf44
--- /dev/null
+++ b/src/nonsfi/linux/linux_pthread_private.h
@@ -0,0 +1,30 @@
+/*
+ * Copyright 2015 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_NONSFI_LINUX_LINUX_PTHREAD_PRIVATE_H_
+#define NATIVE_CLIENT_SRC_NONSFI_LINUX_LINUX_PTHREAD_PRIVATE_H_ 1
+
+#include "native_client/src/include/nacl_base.h"
+
+EXTERN_C_BEGIN
+
+/*
+ * Creates a new thread by calling clone(). This function does use the |stack|
+ * parameter and the thread's entrypoint is |start_func| with |thread_ptr| as
+ * its parameter.
+ */
+int nacl_user_thread_create(void *(*start_func)(void *), void *stack,
+ void *thread_ptr);
+
+/*
+ * Exits a thread started by |nacl_user_thread_create|. Threads started with
+ * pthread_create() should terminate by calling pthread_exit() instead.
+ */
+void nacl_user_thread_exit(int32_t *stack_flag);
+
+EXTERN_C_END
+
+#endif
« no previous file with comments | « src/nonsfi/irt/irt_interfaces.c ('k') | src/nonsfi/linux/linux_pthread_private.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698