Changeset e61d3fe in git


Ignore:
Timestamp:
Sep 12, 2013, 2:36:10 PM (11 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', 'b4f17ed1d25f93d46dbe29e4b499baecc2fd51bb')
Children:
23fb95c1e215ef122b642006b6c3130ee96b8329
Parents:
63c9a7737466fd0b090092ded4895b1b0ce064fba30cafedcb561c528ef5fd1c2dfae0fe72880b5e
Message:
Merge pull request #369 from steenpass/changes_from_master

Changes from master
Location:
Singular
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • Singular/extra.cc

    r63c9a7 re61d3fe  
    314314    if(strcmp(sys_cmd,"cpu")==0)
    315315    {
     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;
    316323      res->rtyp=INT_CMD;
    317       #ifdef _SC_NPROCESSORS_ONLN
    318       res->data=(void *)sysconf(_SC_NPROCESSORS_ONLN);
    319       #elif defined(_SC_NPROCESSORS_CONF)
    320       res->data=(void *)sysconf(_SC_NPROCESSORS_CONF);
    321       #else
    322       // dummy, if not defined:
    323       res->data=(void *)1;
    324       #endif
    325324      return FALSE;
    326325    }
  • Singular/links/silink.cc

    r63c9a7 re61d3fe  
    148148{
    149149  slCleanUp(l);
    150   if (l->ref == 0)
     150  if ((l!=NULL) &&(l->ref == 0))
    151151    omFreeBin((ADDRESS)l,  ip_link_bin);
    152152}
  • Singular/misc_ip.cc

    r63c9a7 re61d3fe  
    10741074  #endif
    10751075  fe_reset_input_mode();
    1076   idhdl h = IDROOT;
    1077   while(h != NULL)
    1078   {
    1079     if(IDTYP(h) == LINK_CMD)
    1080     {
    1081       idhdl hh=h->next;
    1082       killhdl(h, currPack);
    1083       h = hh;
    1084     }
    1085     else
    1086     {
    1087       h = h->next;
    1088     }
    1089   }
    1090   if(!singular_in_batchmode)
     1076  if (ssiToBeClosed_inactive)
     1077  {
     1078    link_list hh=ssiToBeClosed;
     1079    while(hh!=NULL)
     1080    {
     1081      //Print("close %s\n",hh->l->name);
     1082      slPrepClose(hh->l);
     1083      hh=(link_list)hh->next;
     1084    }
     1085    ssiToBeClosed_inactive=FALSE;
     1086
     1087    idhdl h = currPack->idroot;
     1088    while(h != NULL)
     1089    {
     1090      if(IDTYP(h) == LINK_CMD)
     1091      {
     1092        idhdl hh=h->next;
     1093        //Print("kill %s\n",IDID(h));
     1094        killhdl(h, currPack);
     1095        h = hh;
     1096      }
     1097      else
     1098      {
     1099        h = h->next;
     1100      }
     1101    }
     1102    hh=ssiToBeClosed;
     1103    while(hh!=NULL)
     1104    {
     1105      //Print("close %s\n",hh->l->name);
     1106      slClose(hh->l);
     1107      hh=ssiToBeClosed;
     1108    }
     1109  }
     1110  if (!singular_in_batchmode)
    10911111  {
    10921112    if (i<=0)
     
    12151235  slStandardInit();
    12161236  myynest=0;
     1237// semapohore 0 -----------------------------------------------------
     1238  int cpus=2;
     1239  int cpu_n;
     1240  #ifdef _SC_NPROCESSORS_ONLN
     1241  if ((cpu_n=sysconf(_SC_NPROCESSORS_ONLN))>cpus) cpus=cpu_n;
     1242  #elif defined(_SC_NPROCESSORS_CONF)
     1243  if ((cpu_n=sysconf(_SC_NPROCESSORS_CONF))>cpus) cpus=cpu_n;
     1244  #endif
     1245  feSetOptValue(FE_OPT_CPUS, cpus);
    12171246
    12181247// loading standard.lib -----------------------------------------------
  • Singular/si_signals.h

    r63c9a7 re61d3fe  
    4848                   )
    4949
    50 #ifdef HAVE_PSELECT
    51 SI_EINTR_SAVE_FUNC(int, pselect,
    52                    (int nfds, fd_set *readfds, fd_set *writefds,
    53                     fd_set *exceptfds, const struct timespec *timeout,
    54                     const sigset_t *sigmask),
    55                    (nfds, readfds, writefds, exceptfds, timeout,sigmask)
    56                    )
    57 #endif
    58 
    5950SI_EINTR_SAVE_FUNC(pid_t, wait, (int *status), (status))
    6051SI_EINTR_SAVE_FUNC(pid_t, waitpid, (pid_t pid, int *status, int options),
  • Singular/tesths.cc

    r63c9a7 re61d3fe  
    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.