Skip to content
Tcl Source Code History Of Ticket 3065485
Login

History Of Ticket 3065485

Artifacts Associated With Ticket 3065485

  1. Ticket change [251a71135d] (rid 131228) by andreas_kupries on 2010-09-13 19:15:29:

    1. assignee initialized to: "vasiljevic"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      For initialization of thread pools to a sensible size it would be useful to know the number of processors/cores/... the current machine has.
      The following link has quite a bit of info for various platforms:
      http://stackoverflow.com/questions/150355/programmatically-find-the-number-of-cores-on-a-machine
      
      The C-level API might be best to have in Tcl itself, the Tcl command however should be in the Thread package, IMHO.
      
      
    4. foundin initialized to: "None"
    5. is_private initialized to: "0"
    6. priority initialized to: "5 Medium"
    7. resolution initialized to: "None"
    8. status initialized to: "Open"
    9. submitter initialized to: "andreas_kupries"
    10. subsystem initialized to: "80. Thread Package"
    11. title initialized to:
      Portable C-API and Tcl cmd to determine number of processors
      
    12. type initialized to: "RFE"
  2. Add attachment "numcpu.c" [fe5f41aede] (rid 108578) by andreas_kupries on 2010-09-15 05:23:18.

  3. Ticket change [fe667177d5] (rid 108582) by andreas_kupries on 2010-09-15 05:23:19:

    1. icomment:
      
      
      File Added - 386677: numcpu.c
      
      
      
    2. login: "andreas_kupries"
    3. mimetype: "text/plain"
    4. username: "andreas_kupries"
  4. Ticket change [872cfdace4] (rid 131646) by andreas_kupries on 2010-09-16 22:40:24:

    1. icomment:
      Now a proper TIP.
      
      
      
    2. login: "andreas_kupries"
    3. mimetype: "text/plain"
    4. subsystem changed to: "54. Configuration Reporting"
    5. title changed to: "TIP 377 : Portably determine number of processors"
    6. username: "andreas_kupries"
  5. Add attachment "numcpu.c" [c0e634457e] (rid 102498) by andreas_kupries on 2010-09-17 02:57:54.

  6. Ticket change [3cc3713d21] (rid 120964) by andreas_kupries on 2010-09-17 02:57:54:

    1. icomment:
      
      
      File Added - 386869: numcpu.c
      
      
      
    2. login: "andreas_kupries"
    3. mimetype: "text/plain"
    4. username: "andreas_kupries"
  7. Ticket change [7640ee27c9] (rid 105547) by egavilan on 2010-09-24 22:58:51:

    1. icomment:
      On modern BSDs, you can get the number of CPUs used by the kernel with
      
          int numCPU;
          int mib[2];
          size_t len; 
      
          /* set the mib for hw.ncpu */
          mib[0] = CTL_HW;
          mib[1] = HW_NCPU;
      
          /* get the number of CPUs from the system */
          sysctl(mib, 2, &numCPU, &len, NULL, 0);
      
      
      the #includes needed are
      
       #include <sys/types.h>
       #include <sys/sysctl.h>
      
      for {Free|Dragonfly}BSD and
      
      #include <sys/param.h>
      #include <sys/sysctl.h>
      
      For {Open|Net}BSD
      
      
      
    2. login: "egavilan"
    3. mimetype: "text/plain"
    4. username: "egavilan"
  8. Ticket change [eb059936de] (rid 261531) by serhiy.storchaka on 2026-11-13 11:18:44:

    1. closedate changed to: "2461357.9713335303"
    2. closer changed to: "serhiy.storchaka"
    3. icomment:
      TIP 377 was withdrawn and no processor count API was added to Tcl, so closing.
      
    4. login: "serhiy.storchaka"
    5. mimetype: "text/x-fossil-wiki"
    6. resolution changed to: "Rejected"
    7. status changed to: "Closed"