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

Side by Side Diff: fusl/src/thread/pthread_cancel.c

Issue 1575153003: Remove -Wno-logical-op-parentheses for fusl build (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 4 years, 11 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 unified diff | Download patch
« fusl/src/locale/locale_map.c ('K') | « fusl/src/passwd/getpw_a.c ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #define _GNU_SOURCE 1 #define _GNU_SOURCE
2 #include <string.h> 2 #include <string.h>
3 #include "pthread_impl.h" 3 #include "pthread_impl.h"
4 #include "syscall.h" 4 #include "syscall.h"
5 #include "libc.h" 5 #include "libc.h"
6 6
7 __attribute__((__visibility__("hidden"))) 7 __attribute__((__visibility__("hidden")))
8 long __cancel(), __syscall_cp_asm(), __syscall_cp_c(); 8 long __cancel(), __syscall_cp_asm(), __syscall_cp_c();
9 9
10 long __cancel() 10 long __cancel()
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 { 52 {
53 pthread_t self = __pthread_self(); 53 pthread_t self = __pthread_self();
54 ucontext_t *uc = ctx; 54 ucontext_t *uc = ctx;
55 uintptr_t pc = uc->uc_mcontext.MC_PC; 55 uintptr_t pc = uc->uc_mcontext.MC_PC;
56 56
57 a_barrier(); 57 a_barrier();
58 if (!self->cancel || self->canceldisable == PTHREAD_CANCEL_DISABLE) retu rn; 58 if (!self->cancel || self->canceldisable == PTHREAD_CANCEL_DISABLE) retu rn;
59 59
60 _sigaddset(&uc->uc_sigmask, SIGCANCEL); 60 _sigaddset(&uc->uc_sigmask, SIGCANCEL);
61 61
62 » if (self->cancelasync || pc >= (uintptr_t)__cp_begin && pc < (uintptr_t) __cp_end) { 62 » if (self->cancelasync || (pc >= (uintptr_t)__cp_begin && pc < (uintptr_t )__cp_end)) {
63 uc->uc_mcontext.MC_PC = (uintptr_t)__cp_cancel; 63 uc->uc_mcontext.MC_PC = (uintptr_t)__cp_cancel;
64 return; 64 return;
65 } 65 }
66 66
67 __syscall(SYS_tkill, self->tid, SIGCANCEL); 67 __syscall(SYS_tkill, self->tid, SIGCANCEL);
68 } 68 }
69 69
70 void __testcancel() 70 void __testcancel()
71 { 71 {
72 pthread_t self = __pthread_self(); 72 pthread_t self = __pthread_self();
(...skipping 14 matching lines...) Expand all
87 int pthread_cancel(pthread_t t) 87 int pthread_cancel(pthread_t t)
88 { 88 {
89 static int init; 89 static int init;
90 if (!init) { 90 if (!init) {
91 init_cancellation(); 91 init_cancellation();
92 init = 1; 92 init = 1;
93 } 93 }
94 a_store(&t->cancel, 1); 94 a_store(&t->cancel, 1);
95 return pthread_kill(t, SIGCANCEL); 95 return pthread_kill(t, SIGCANCEL);
96 } 96 }
OLDNEW
« fusl/src/locale/locale_map.c ('K') | « fusl/src/passwd/getpw_a.c ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698