Changeset 0f194b in git


Ignore:
Timestamp:
Aug 19, 2019, 3:12:41 PM (4 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'spielwiese', '828514cf6e480e4bafc26df99217bf2a1ed1ef45')
Children:
a425b7aa8a792f87c94172e1daf6a6429289c233
Parents:
c05547ab0c38b37057f7936de29b0c7c085da8120a374dfc252034170c772ac44b6740e217190fbb
git-author:
Hans Schoenemann <hannes@mathematik.uni-kl.de>2019-08-19 15:12:41+02:00
git-committer:
GitHub <noreply@github.com>2019-08-19 15:12:41+02:00
Message:
Merge pull request #951 from steenpass/get_value

fix cases where system("semaphore", "get_value", ) is negative
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Singular/LIB/modular.lib

    rc05547 r0f194b  
    136136        else
    137137        {
    138             ncores_available = system("semaphore", "get_value", sem_cores)+1;
     138            ncores_available = max(1, system("semaphore", "get_value",
     139                    sem_cores)+1);
    139140            if (nAllPrimes < ncores_available)
    140141            {
     
    415416static proc NbModProcs()
    416417{
    417     int available = system("semaphore", "get_value", sem_cores)+1;
     418    int available = max(1, system("semaphore", "get_value", sem_cores)+1);
    418419    int nb;
    419420    if (available < 16) {
Note: See TracChangeset for help on using the changeset viewer.