Changeset 808192 in git


Ignore:
Timestamp:
Dec 5, 2013, 6:15:43 PM (9 years ago)
Author:
Andreas Steenpass <steenpass@…>
Branches:
(u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', '5bec8f88c9ee2573d328cf7c3aff2bcb301d2395')
Children:
7f974f6a471f29692ae22b5338098c047680b0f7
Parents:
7258bd145a0340b829533d383be678d2ed075058
git-author:
Andreas Steenpass <steenpass@mathematik.uni-kl.de>2013-12-05 18:15:43+01:00
git-committer:
Andreas Steenpass <steenpass@mathematik.uni-kl.de>2013-12-05 18:19:39+01:00
Message:
fix: initialize sem_cores correctly
(cherry picked from commit fc412a66edca885f4769640fcfb4639995b20785)

Signed-off-by: Andreas Steenpass <steenpass@mathematik.uni-kl.de>
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Singular/LIB/resources.lib

    r7258bd r808192  
    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.