Mercurial > hg > CbC > CbC_gcc
comparison libgomp/barrier.c @ 111:04ced10e8804
gcc 7
author | kono |
---|---|
date | Fri, 27 Oct 2017 22:46:09 +0900 |
parents | a06113de4d67 |
children | 84e7813d76e9 |
comparison
equal
deleted
inserted
replaced
68:561a7518be6b | 111:04ced10e8804 |
---|---|
1 /* Copyright (C) 2005, 2009 Free Software Foundation, Inc. | 1 /* Copyright (C) 2005-2017 Free Software Foundation, Inc. |
2 Contributed by Richard Henderson <rth@redhat.com>. | 2 Contributed by Richard Henderson <rth@redhat.com>. |
3 | 3 |
4 This file is part of the GNU OpenMP Library (libgomp). | 4 This file is part of the GNU Offloading and Multi Processing Library |
5 (libgomp). | |
5 | 6 |
6 Libgomp is free software; you can redistribute it and/or modify it | 7 Libgomp is free software; you can redistribute it and/or modify it |
7 under the terms of the GNU General Public License as published by | 8 under the terms of the GNU General Public License as published by |
8 the Free Software Foundation; either version 3, or (at your option) | 9 the Free Software Foundation; either version 3, or (at your option) |
9 any later version. | 10 any later version. |
37 if (team == NULL) | 38 if (team == NULL) |
38 return; | 39 return; |
39 | 40 |
40 gomp_team_barrier_wait (&team->barrier); | 41 gomp_team_barrier_wait (&team->barrier); |
41 } | 42 } |
43 | |
44 bool | |
45 GOMP_barrier_cancel (void) | |
46 { | |
47 struct gomp_thread *thr = gomp_thread (); | |
48 struct gomp_team *team = thr->ts.team; | |
49 | |
50 /* The compiler transforms to barrier_cancel when it sees that the | |
51 barrier is within a construct that can cancel. Thus we should | |
52 never have an orphaned cancellable barrier. */ | |
53 return gomp_team_barrier_wait_cancel (&team->barrier); | |
54 } |