Tcl Source Code

View Ticket
Login
Ticket UUID: 2017264
Title: NRE: remove unused TclpThreadGetStackSize()
Type: Bug Version: obsolete: 8.6a1
Submitter: das Created on: 2008-07-13 13:26:00
Subsystem: 52. Portability Support Assigned To: das
Priority: 9 Immediate Severity:
Status: Closed Last Modified: 2008-08-14 06:14:50
Resolution: Fixed Closed By: das
    Closed on: 2008-08-13 23:14:50
Description:
with the stack checking removed in NRE, TclpThreadGetStackSize() in tclUnixThrd.c is no longer used and could be removed, along with the config checks for HAVE_PTHREAD_ATTR_SETSTACKSIZE and HAVE_PTHREAD_GET_STACKSIZE_NP.
User Comments: das added on 2008-08-14 06:14:50:
Logged In: YES 
user_id=90580
Originator: YES

comitted

das added on 2008-08-09 06:35:28:
Logged In: YES 
user_id=90580
Originator: YES

agreed, will deal with it tomorrow, along with the dtrace NRE patch (any progress with the help you promised with that miguel ? ;-)

msofer added on 2008-08-09 06:27:59:
Logged In: YES 
user_id=148712
Originator: NO

It'd be nice if this made it for the 8.6a2 release, so that we get early screaming (if any)

jenglish added on 2008-08-06 23:58:41:
Logged In: YES 
user_id=68433
Originator: NO

@das -- could you apply the patch and rerun autoconf?  I don't seem to have autoconf 2.61 anywhere.

jenglish added on 2008-08-05 15:01:54:

File Added - 287115: 2017264.patch

Logged In: YES 
user_id=68433
Originator: NO

TclpThreadGetStackSize() can definitely be removed: there are no callers remaining in-tree, and since it's MODULE_SCOPE there are no external callers either.  (Plus, it doesn't work.)

With that gone, TclpPthreadGetAttrs is no longer used, so the wodge of horrid #ifdeffery in tclUnixPort.h that defines it can go away too.

That wodge of horrid #ifdeffery is the only user of the macros HAVE_PTHREAD_ATTR_GET_NP, HAVE_PTHREAD_GETATTR_NP, GETATTRNP_NOT_DECLARED, and ATTRGETNP_NOT_DECLARED, so a big chunk of tcl.m4 can go away too.

Looking in the same area: pthread_get_stacksize_np isn't used anymore either; the autoconf check for that can go too.

That gets rid of all references to "pthread_*_np" in tree, which will help portability (the "_np" stands for "_nonportable") and maintainability.



File Added: 2017264.patch

msofer added on 2008-07-30 08:14:05:
Logged In: YES 
user_id=148712
Originator: NO

I Know it is not needed in any of the areas where I am familiar; threading stuff is not one of them. Reassigning to let the knowledgeable people shoot it out. Yes, I am a coward :P

das added on 2008-07-30 08:05:30:
Logged In: YES 
user_id=90580
Originator: YES

no, not invalid...

TclpThreadGetStackSize()  and the HAVE_PTHREAD_GET_STACKSIZE_NP configure check are definitely no longer needed and can be removed.

mistachkin added on 2008-07-14 11:23:28:
Logged In: YES 
user_id=113501
Originator: NO


I agree with still needed.

msofer added on 2008-07-13 22:56:04:
Logged In: YES 
user_id=148712
Originator: NO

I'd say "still needed": TclpThreadCreate's "stackSize" is part of the public API (via the Tcl_CreateThread)

das added on 2008-07-13 22:47:50:
Logged In: YES 
user_id=90580
Originator: YES

yep, noticed that after posting the bug as well...
made me wonder whether the stack size manipulation in TclpThreadCreate() is still needed now ?

msofer added on 2008-07-13 22:24:07:
Logged In: YES 
user_id=148712
Originator: NO

HAVE_PTHREAD_ATTR_SETSTACKSIZE seems to be used in TclpThreadCreate too.

Attachments: