Changeset c848e3 in git


Ignore:
Timestamp:
Mar 22, 2012, 3:30:54 PM (12 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
0bae3e12c3651cf05e6cc405368481bcbbe0dbff
Parents:
7d63e1e0792380ed518adc5f2805eb4abcb1ee55
git-author:
Hans Schoenemann <hannes@mathematik.uni-kl.de>2012-03-22 15:30:54+01:00
git-committer:
Andreas Steenpass <steenpass@mathematik.uni-kl.de>2013-09-12 13:19:30+02:00
Message:
chg: re-enable system("cpu"), change setting of semaphore 0
(cherry picked from commit 71871dcf30b201439f1a4885b5dd9f6ecd140938)

Signed-off-by: Andreas Steenpass <steenpass@mathematik.uni-kl.de>
Location:
Singular
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • Singular/extra.cc

    r7d63e1 rc848e3  
    314314    if(strcmp(sys_cmd,"cpu")==0)
    315315    {
    316       res->data=(void *)feOptValue(FE_OPT_CPUS);
     316      long cpu=1; //feOptValue(FE_OPT_CPUS);
     317      #ifdef _SC_NPROCESSORS_ONLN
     318      cpu=sysconf(_SC_NPROCESSORS_ONLN);
     319      #elif defined(_SC_NPROCESSORS_CONF)
     320      cpu=sysconf(_SC_NPROCESSORS_CONF);
     321      #endif
     322      res->data=(void *)cpu;
    317323      res->rtyp=INT_CMD;
    318324      return FALSE;
  • Singular/tesths.cc

    r7d63e1 rc848e3  
    136136  feOptIndex cpu_opt = feGetOptIndex("cpus");
    137137  int cpus = (int)(long)feOptValue(FE_OPT_CPUS);
    138   sipc_semaphore_init(0, cpus);
     138  sipc_semaphore_init(0, cpus-1);
    139139#endif
    140140
Note: See TracChangeset for help on using the changeset viewer.