This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] [libgomp] make it possible to use OMP on both sides of a fork
- From: Richard Henderson <rth at redhat dot com>
- To: Nathaniel Smith <njs at pobox dot com>
- Cc: Jakub Jelinek <jakub at redhat dot com>, gcc-patches at gcc dot gnu dot org
- Date: Tue, 18 Feb 2014 14:58:05 -0600
- Subject: Re: [PATCH] [libgomp] make it possible to use OMP on both sides of a fork
- Authentication-results: sourceware.org; auth=none
- References: <CAPJVwBkOF5GnrMr=4d1ehEKRGkY0tHzJzfXAYBguawu9y5wxXw at mail dot gmail dot com> <52FD37A1 dot 6040404 at redhat dot com> <20140214082124 dot GA20378 at tucnak dot redhat dot com> <52FE7918 dot 1020503 at redhat dot com> <CAPJVwBm_C6oY9ZR5TnmzNb2jgMWmbL3sDGS-6cmCSkPHKoSKAA at mail dot gmail dot com>
On 02/16/2014 03:59 PM, Nathaniel Smith wrote:
> Yes, but the problem is that depending on what the user intends to do
> after forking, our pthread_atfork handler might help or it might hurt,
> and we don't know which. Consider these two cases:
> - fork+exec
> - fork+continue to use OMP in child
> The former case is totally POSIX-legal, even when performed at
> arbitrary places, even when another thread is, say, in the middle of
> calling malloc().
Point well taken.
r~