Changeset 7f974f in git


Ignore:
Timestamp:
Dec 5, 2013, 6:41:23 PM (9 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', '48f1dd268d0ff74ef2f7dccbf02545425002ddcc')
Children:
42f2ad0e44454045e95a5dea3298675e39832506
Parents:
7258bd145a0340b829533d383be678d2ed0750588081924f8620f04b5a1659644083d6105daa1a2c
Message:
Merge pull request #442 from steenpass/sem_cores_sw

fix: initialize sem_cores correctly
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Singular/LIB/resources.lib

    r7258bd r7f974f  
    3131static proc mod_init()
    3232{
    33     int sem_cores = semaphore(system("--cpus"))-1;
     33    int sem_cores = semaphore(system("--cpus")-1);
    3434    exportto(Resources, sem_cores);
    3535    int NCORES = system("semaphore", "get_value", sem_cores)+1;
     
    123123EXAMPLE:  example semaphore; shows an example"
    124124{
    125     int i = 1;
     125    int i = 0;
    126126    while (system("semaphore", "exists", i) == 1) {
    127127        i++;
Note: See TracChangeset for help on using the changeset viewer.