Ignore:
Timestamp:
Jun 6, 2018, 5:45:04 PM (6 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, with_gc
Children:
ae3bb3d, b4e1876, e5d5272
Parents:
2ee0076 (diff), 214e8da (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' of plg2:software/cfa/cfa-cc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/libcfa/concurrency/kernel.c

    r2ee0076 r09ccaf5  
    1616//C Includes
    1717#include <stddef.h>
     18#include <errno.h>
    1819extern "C" {
    1920#include <stdio.h>
     
    663664        __cfaabi_dbg_print_safe("Kernel : Processor %p ready to sleep\n", this);
    664665
    665         verify( ({int sval = 0; sem_getvalue(&this->idleLock, &sval); sval; }) < 65536);
    666         sem_wait(&idleLock);
     666        verify( ({int sval = 0; sem_getvalue(&this->idleLock, &sval); sval; }) < 200);
     667        int __attribute__((unused)) ret = sem_wait(&idleLock);
     668        verify(ret > 0 || errno == EINTR);
    667669
    668670        __cfaabi_dbg_print_safe("Kernel : Processor %p woke up and ready to run\n", this);
     
    678680void wake(processor * this) {
    679681        __cfaabi_dbg_print_safe("Kernel : Waking up processor %p\n", this);
    680         sem_post(&this->idleLock);
    681         verify( ({int sval = 0; sem_getvalue(&this->idleLock, &sval); sval; }) < 65536);
     682        int __attribute__((unused)) ret = sem_post(&this->idleLock);
     683        verify(ret > 0 || errno == EINTR);
     684        verify( ({int sval = 0; sem_getvalue(&this->idleLock, &sval); sval; }) < 200);
    682685}
    683686
Note: See TracChangeset for help on using the changeset viewer.