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

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

Issue 1300883003: Revert of Non-SFI mode: Add Linux asynchronous signal support (Closed) Base URL: https://chromium.googlesource.com/native_client/src/native_client.git@master
Patch Set: Created 5 years, 4 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/linux/linux_pthread_private.h ('k') | src/nonsfi/linux/linux_sys_private.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/nonsfi/linux/linux_pthread_private.c
diff --git a/src/nonsfi/linux/linux_pthread_private.c b/src/nonsfi/linux/linux_pthread_private.c
index 335b8f1a6dcd0ca10f4f94d4e02937abd49a1202..ed3eaa0d6ba76714b9e185514331f4cc3ee5781f 100644
--- a/src/nonsfi/linux/linux_pthread_private.c
+++ b/src/nonsfi/linux/linux_pthread_private.c
@@ -25,25 +25,15 @@
return 0;
}
-static int nacl_irt_thread_create_v0_2(void (*start_func)(void), void *stack,
- void *thread_ptr,
- nacl_irt_tid_t *child_tid) {
+static int nacl_irt_thread_create(void (*start_func)(void), void *stack,
+ void *thread_ptr) {
/*
* We do not use CLONE_CHILD_CLEARTID as we do not want any
* non-private futex signaling. Also, NaCl ABI does not require us
* to signal the futex on stack_flag.
*/
int flags = (CLONE_VM | CLONE_FS | CLONE_FILES | CLONE_SIGHAND |
- CLONE_THREAD | CLONE_SYSVSEM | CLONE_SETTLS |
- CLONE_PARENT_SETTID);
- /*
- * In order to avoid allowing clone with and without CLONE_PARENT_SETTID, if
- * |child_tid| is NULL, we provide a valid pointer whose value will be
- * ignored.
- */
- nacl_irt_tid_t ignored;
- void *ptid = (child_tid != NULL) ? child_tid : &ignored;
-
+ CLONE_THREAD | CLONE_SYSVSEM | CLONE_SETTLS);
/*
* linux_clone_wrapper expects start_func's type is "int (*)(void *)".
* Although |start_func| has type "void (*)(void)", the type mismatching
@@ -52,13 +42,7 @@
*/
return irt_return_call(linux_clone_wrapper(
(uintptr_t) start_func, /* arg */ 0, flags, stack,
- ptid, thread_ptr, /* ctid */ NULL));
-}
-
-static int nacl_irt_thread_create(void (*start_func)(void), void *stack,
- void *thread_ptr) {
- nacl_irt_tid_t child_tid;
- return nacl_irt_thread_create_v0_2(start_func, stack, thread_ptr, &child_tid);
+ /* ptid */ NULL, thread_ptr, /* ctid */ NULL));
}
static void nacl_irt_thread_exit(int32_t *stack_flag) {
@@ -136,7 +120,7 @@
* Based on code from src/untrusted/irt/irt_thread.c
*/
int nacl_user_thread_create(void *(*start_func)(void *), void *stack,
- void *thread_ptr, nacl_irt_tid_t *child_tid) {
+ void *thread_ptr) {
struct nc_combined_tdb *tdb;
/*
@@ -161,8 +145,7 @@
tdb->tdb.start_func = start_func;
tdb->tdb.state = thread_ptr;
- return nacl_irt_thread_create_v0_2(irt_start_thread, stack, irt_tp,
- child_tid);
+ return nacl_irt_thread_create(irt_start_thread, stack, irt_tp);
}
/*
« no previous file with comments | « src/nonsfi/linux/linux_pthread_private.h ('k') | src/nonsfi/linux/linux_sys_private.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698