| Store | Cart

Re: [TCLCORE] TIP #435: Safe Mutex Disposal API

From: Donald G Porter <dona...@nist.gov>
Wed, 20 May 2015 11:31:12 -0400
Donald G Porter <dona...@nist.gov>:
>> 2) The new routine should only be called when the mutex argument>>      is locked.  How is it known in the AtForkChild() callback that>>      this is the case?

On 05/20/2015 11:21 AM, Jan Nijtmans wrote:
> Because there's a Tcl_MutexLock/Tcl_MutexUnlock pair around> the pthread_atfork() call, that's where the AtForkChild() callback> is generated.

I may have a misunderstanding, but I thought that pthread_atfork()
registered the routines only; it did not call them.  Rather they
get called as part of the whole fork() operation.

So when fork() is called, how do we know at that point that the
notifierMutex is locked by some thread?

>> Actually, if the new function is only called from inside Tcl core,> I wonder if we really should reserve a Stub entry for this.> This would mean that the bug can be solved without> the need for a TIP, in both 8.5 and 8.6 ;-)

An actual use case for making the routine public would improve
the proposal.

-- 
| Don Porter            Applied and Computational Mathematics Division |
| dona...@nist.gov             Information Technology Laboratory |
| http://math.nist.gov/~DPorter/                                  NIST |
|______________________________________________________________________|

------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Tcl-Core mailing list
Tcl-...@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tcl-core

Recent Messages in this Thread
Donal Fellows May 16, 2015 01:46 pm
Donal K. Fellows May 16, 2015 01:53 pm
Alexandre Ferrieux May 17, 2015 01:49 pm
Joe Mistachkin May 17, 2015 05:00 pm
Alexandre Ferrieux May 17, 2015 10:49 pm
Joe Mistachkin May 17, 2015 11:56 pm
Donal K. Fellows May 18, 2015 08:32 am
Alexandre Ferrieux May 18, 2015 04:44 pm
Joe Mistachkin May 18, 2015 04:58 pm
Alexandre Ferrieux May 18, 2015 09:42 pm
Donald G Porter May 20, 2015 02:39 pm
Donald G Porter May 20, 2015 02:01 pm
Donald G Porter May 20, 2015 02:16 pm
Jan Nijtmans May 20, 2015 03:21 pm
Jan Nijtmans May 20, 2015 03:30 pm
Donald G Porter May 20, 2015 03:31 pm
Donald G Porter May 20, 2015 04:13 pm
Donald G Porter May 27, 2015 03:24 pm
Jeff Rogers May 27, 2015 04:50 pm
Joe Mistachkin Jun 01, 2015 05:49 pm
Joe Mistachkin May 31, 2015 07:54 pm
Gustaf Neumann Jun 01, 2015 08:28 am
Jeff Rogers Jun 01, 2015 04:23 pm
Joe Mistachkin May 27, 2015 09:19 pm
Gustaf Neumann May 31, 2015 12:52 pm
Donal K. Fellows Jun 08, 2015 10:12 pm
Messages in this thread