Skip to content
Tcl Source Code History Of Ticket eeddb0693a950be9
Login

History Of Ticket eeddb0693a950be9

Artifacts Associated With Ticket eeddb0693a950be9

  1. Ticket change [d6e9e69645] (rid 163199) by dkf on 2018-05-20 14:57:52:

    1. assignee initialized to: "nobody"
    2. closer initialized to: "nobody"
    3. cmimetype initialized to: "text/html"
    4. comment initialized to:
      Given that all our source code will pass this stanza early in tcl.h:
      <pre>
      #ifndef TCL_THREADS
      #   define TCL_THREADS 1
      #endif
      </pre>
      Why do we then write this in so many places?
      <pre>
      #if !defined(TCL_THREADS) || TCL_THREADS
      </pre>
      Surely (given that we know TCL_THREADS is defined, and it is assumed to be numeric), it'd be enough to do this:
      <pre>
      #if TCL_THREADS
      </pre>
      That'd make the code more readable if nothing else.
      
    5. is_private initialized to: "0"
    6. login: "dkf"
    7. priority initialized to: "5 Medium"
    8. resolution initialized to: "None"
    9. severity initialized to: "Cosmetic"
    10. status initialized to: "Open"
    11. submitter initialized to: "dkf"
    12. subsystem initialized to: "49. Threading"
    13. title initialized to: "TIP #491 implementation has odd #ifdef usage"
    14. type initialized to: "Bug"
  2. Ticket change [7cfb503acd] (rid 163200) by dkf on 2018-05-20 14:58:19:

    1. assignee changed to: "jan.nijtmans"
    2. login: "dkf"
    3. mimetype: "text/plain"
    4. priority changed to: "3 Low"
  3. Ticket change [d421fd4eaf] (rid 163205) by jan.nijtmans on 2018-05-21 08:11:00:

    1. closedate changed to: "2458259.84097813"
    2. closer changed to: "jan.nijtmans"
    3. icomment:
      This is on purpose. It makes Tcl build also without TCL_THREADS defined, as is done in Tcl 9.  Otherwise all #ifdef's regarding TCL_THREADS would be different in core-8-branch and trunk, which only increases the possibility of future merge conflicts.
      
      Actually, I misplaced one #endif in tcl.h (fixed now), which demonstrates how Tcl can build WITHOUT TCL_THREADS defined. So, yes, it makes all #ifdefs somewhat more complicated. But that doesn't really matter because in Tcl 9 we should gradually remove all of them anyway. (I don't want to do it yet, not before Tcl 8.7 is finally released, because there might be protests regarding non-threaded builds. So - for now - I want to keep Tcl building with TCL_THREADS=0)
      
    4. login: "jan.nijtmans"
    5. mimetype: "text/plain"
    6. resolution changed to: "Invalid"
    7. status changed to: "Closed"
  4. Ticket change [2fb76d6e6f] (rid 163219) by dkf on 2018-05-21 10:08:50:

    1. closedate changed to: "2458259.92281192"
    2. closer changed to: "dkf"
    3. icomment:
      I was approving the:
      <pre>
      #ifndef TCL_THREADS
      #   define TCL_THREADS 1
      #endif
      </pre>
      It was the fact that <strong>after</strong> that, we can just use:
      <pre>
      #if TCL_THREADS
      </pre>
      since we can know that TCL_THREADS is definitely defined. If it wasn't, the ifndef/define pair would have set it to 1. In other words, everything that includes tcl.h will define TCL_THREADS so <code>!defined(TCL_THREADS)</code> is a constant (zero), and we assume that it is boolean (which I also approve of).
      <p>
      Basically, <code>#if !defined(TCL_THREADS) || TCL_THREADS</code> can now become just <code>#if TCL_THREADS</code> with no ill-effects that I can think of.
      
    4. login: "dkf"
    5. mimetype: "text/html"
  5. Ticket change [a15f9208aa] (rid 163228) by dgp on 2018-05-22 11:56:38:

    1. closedate changed to: "2458260.99766238"
    2. closer changed to: "dgp"
    3. icomment:
      
      Consider this approach. On core-8-branch, put in place
      the simpler scheme dkf is suggesting.
      
      Then for the sake of clean merges, make trunk the same
      everywhere except in tcl.h have a single explicit line:
      
      #define TCL_THREADS 1
      
      Then on the trunk we still have the known condition
      that every file that includes tcl.h has TCL_THREADS
      defined and we need not test for that.  But we have
      also deleted all "easy" ways to call for a thread-disabled
      build.
      
      Over time, all tests for TCL_THREADS should disappear
      from trunk, and as soon as they are all gone, that line
      can go too.
      
      Any troubles with that?
      
    4. login: "dgp"
    5. mimetype: "text/plain"
  6. Ticket change [774ac6666a] (rid 163229) by jan.nijtmans on 2018-05-22 20:01:58:

    1. closedate changed to: "2458261.33470601"
    2. closer changed to: "jan.nijtmans"
    3. icomment:
      I'm spotting the possibility for a nice compromise: How about #defining TCL_THREADS in tclInt.h too?  This makes the simplifications possible as dkf noted, but it doesn't affect the public API.  I can very well live with that. Hang on .....
      
    4. login: "jan.nijtmans"
    5. mimetype: "text/plain"
  7. Ticket change [0a61011117] (rid 163264) by jan.nijtmans on 2018-05-22 20:54:36:

    1. closedate changed to: "2458261.37125439"
    2. icomment: "So have a look at core-8-branch now ..."
    3. login: "jan.nijtmans"
    4. mimetype: "text/plain"
    5. resolution changed to: "Fixed"
  8. Ticket change [973373e12a] (rid 163274) by dgp on 2018-05-23 12:39:59:

    1. closedate changed to: "2458262.02777139"
    2. closer changed to: "dgp"
    3. icomment:
      The idea sounds promising. At the moment though
      the core-8-branch doesn't build.
      
      ...  /home/dgp/fossil/tcl8.7/unix/tclSelectNotfy.c
      In file included from /home/dgp/fossil/tcl8.7/unix/tclSelectNotfy.c:262:0:
      /home/dgp/fossil/tcl8.7/unix/tclUnixNotfy.c: In function ‘Tcl_AlertNotifier’:
      /home/dgp/fossil/tcl8.7/unix/tclUnixNotfy.c:126:18: error: ‘ThreadSpecificData’ has no member named ‘triggerEventFd’
        if (write(tsdPtr->triggerEventFd, &eventFdVal,
                        ^
      /home/dgp/fossil/tcl8.7/unix/tclSelectNotfy.c: In function ‘Tcl_WaitForEvent’:
      /home/dgp/fossil/tcl8.7/unix/tclSelectNotfy.c:703:2: warning: implicit declaration of function ‘StartNotifierThread’ [-Wimplicit-function-declaration]
        StartNotifierThread("Tcl_WaitForEvent");
        ^
      /home/dgp/fossil/tcl8.7/unix/tclSelectNotfy.c: In function ‘NotifierThreadProc’:
      /home/dgp/fossil/tcl8.7/unix/tclSelectNotfy.c:1061:3: warning: implicit declaration of function ‘AlertSingleThread’ [-Wimplicit-function-declaration]
         AlertSingleThread(tsdPtr);
         ^
      /home/dgp/fossil/tcl8.7/unix/tclSelectNotfy.c: At top level:
      /home/dgp/fossil/tcl8.7/unix/tclSelectNotfy.c:200:13: warning: ‘AtForkChild’ used but never defined [enabled by default]
       static void AtForkChild(void);
      
    4. login: "dgp"
    5. mimetype: "text/plain"
  9. Ticket change [7dfb4e261c] (rid 163275) by dgp on 2018-05-23 12:41:41:

    1. closedate changed to: "2458262.02895735"
    2. icomment:
      
      Looks like a two part mystery.
      
      1) Why build the select notifier? I'm expecting the epoll.
      
      2) Once we decide to bulid the select notifier, why doesn't it?
      
    3. login: "dgp"
    4. mimetype: "text/plain"
  10. Ticket change [e9a25b9397] (rid 163276) by dgp on 2018-05-23 13:08:18:

    1. closedate changed to: "2458262.04744016"
    2. icomment:
      
      It's only the last checkin [bf06e36b25] that broke
      things, so maybe we can look at it and figure out
      what went wrong.
      
    3. login: "dgp"
    4. mimetype: "text/plain"
  11. Ticket change [9f1842e7c4] (rid 163277) by dgp on 2018-05-23 13:34:52:

    1. closedate changed to: "2458262.06588265"
    2. icomment:
      
      Shifting the placement of the internal header includes
      seems to take care of it.
      
    3. login: "dgp"
    4. mimetype: "text/plain"
  12. Ticket change [0773bce4ce] (rid 163425) by jan.nijtmans on 2018-05-25 08:45:34:

    1. closedate changed to: "2458263.86498079"
    2. closer changed to: "jan.nijtmans"
    3. icomment:
      Thanks, Don for your fixes!
      
      Still not all CFLAG handlings were correct, but everything should be corrected now. I hope the current implementation satisfies everyone.
      
    4. login: "jan.nijtmans"
    5. mimetype: "text/plain"