Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2014-10-09
19:25 • Wiki page "Threads" artifact: 3d3da087c9 user: dgp
2014-08-29
16:04 • Ticket [547989ffff] Undocumented public API: threads status still Open with ... artifact: ee726db741 user: dgp
2013-09-10
18:51 • Ticket [547989ffff]: 3 changes artifact: 7f87b270df user: dkf
18:50 • Ticket [547989ffff]: 7 changes artifact: 6ddd10d310 user: dkf
18:46
[547989] Proposed implementation of the change described in the comments of the bug report. leaf check-in: 942397a2a7 user: dkf tags: bug-547989
2008-03-20
17:00 • Ticket [547989ffff] Undocumented public API: threads status still Open with ... artifact: af6517005c user: dkf
2007-12-13
18:49 • Ticket [547989ffff]: 4 changes artifact: 342bd2dd06 user: dkf
2007-10-31
23:55 • Ticket [547989ffff]: 1 change artifact: 6ecb6c7e6e user: dgp
2007-07-01
02:30 • Ticket [547989ffff]: 4 changes artifact: 12b9d6fad9 user: vasiljevic
01:04 • Ticket [547989ffff]: 4 changes artifact: fc69617e85 user: dkf
2007-06-30
22:59 • Ticket [547989ffff]: 4 changes artifact: 35512f44a4 user: vasiljevic
2003-04-14
11:11 • Ticket [547989ffff]: 1 change artifact: 37076fdf71 user: dgp
2002-07-25
03:09 • Ticket [547989ffff]: 1 change artifact: e052843ca8 user: hobbs
2002-05-15
02:15 • Ticket [547989ffff]: 5 changes artifact: a1cca934af user: andreas_kupries
2002-04-24
09:57 • New ticket [547989ffff]. artifact: a2ddc2dff4 user: dkf

Undocumented public API: threads

Open547989ffffffffffffffffffffffffffffffffffCreated 25 years agoUpdated 12 years ago
Descriptionplain2002-04-24 09:57:59
The following publically-named API functions are
undocumented.

Tcl_GetAllocMutex (mac/tclMacThrd.c)
Tcl_GetAllocMutex (unix/tclUnixThrd.c)
Tcl_GetAllocMutex (win/tclWinThrd.c)
andreas_kupriesplain2002-05-15 02:15:05
Logged In: YES 
user_id=75003

It is also exported through the public stub table.

Its description however indicates that it is more
an internal function required for the initialization
of the memory allocation subsystem (MAS) of the
core.

IMHO making it public makes sense only if we allow
the replacement of the MAS by an external system.
Something I consider unlikely.

Hm, ports to PDA's ? ... No, not even for such.
They most likely will use a different allocator,
yes, but that is part of the porting work. The
change is not externally visible.

So, my recommendation for now is to not to
document this function and to make it internal
in the next major release of the core.

I will assign this now to Jeff to get his
opinion too.
hobbs Ticket [547989ffff]: 1 change [History diff]2002-07-25 03:09:29
dgp Ticket [547989ffff]: 1 change [History diff]2003-04-14 11:11:54
vasiljevicplain2007-06-30 22:59:55
Logged In: YES 
user_id=95086
Originator: NO

I have very little experience with stub exported calls.
It is definitely so that above are to be used only internally
and should therefore be named as TclpGetAllocMutex or such.
They should not be exported.  

So what to do? Wait for 9.0 and scrap them out of the 
public API?
dkfplain2007-07-01 01:04:05
Logged In: YES 
user_id=79902
Originator: YES

I agree (given comments here) that it probably should be called TclpGetAllocMutex, and should have MODULE_SCOPE, but who knows who is calling it? :-( So, I suggest doing the rename and then creating a wrapper function (called Tcl_GetAllocMutex) that calls the real function. (Maybe while printing a message stderr that an unsupported/deprecated API has been called?) There should also be a comment in tcl.decls beside the function declaration that indicates that the function is deprecated and likely to be removed in 9.0.

With that done, open a separate FRQ ticket to remind us to revisit this (i.e. remove the function) for 9.0, which is when we allow that sort of ABI change. With *that* done, close this ticket.

Does this make things clear?
vasiljevicplain2007-07-01 02:30:03
Logged In: YES 
user_id=95086
Originator: NO

All is clear.
dgp Ticket [547989ffff]: 1 change [History diff]2007-10-31 23:55:36
dkfplain2007-12-13 18:49:26
Logged In: YES 
user_id=79902
Originator: YES

Looking in the 'changes' file, I see this:

8/9/99 (internal api change) Removed the TclpMutexLock and TclpMutexUnlock
APIs and added a new exported api, Tcl_GetAllocMutex. These APIs are all for
the mutex used in the simple memory allocators.  By making this change
we are able to substitute different implementations of the thread-related
APIs without having to recompile the Tcl core. (welch)
dkfplain2008-03-20 17:00:06
Logged In: YES 
user_id=79902
Originator: YES

It seems to me that the right thing to do is to switch this to a call in the internal stubs table; anything poking this deep needs to beware the dragons anyway. Hence it is better not documented (other than perhaps in comments in tclInt.decls and the rest of the sources).

Dropping prio; no way should this block the 8.5.2 release!
dkfwiki2013-09-10 18:50:06

See branch bug-547989 for proposed code.

dkf Ticket [547989ffff]: 3 changes [History diff]2013-09-10 18:51:40
dgpplain2014-08-29 16:04:13
heh.  This one got away.
Log in (anonymous is fine) to add a comment.