Changeset 5510027
- Timestamp:
- Jun 5, 2018, 3:32:43 PM (6 years ago)
- 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:
- dafdbe7
- Parents:
- d885a58
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/libcfa/concurrency/kernel.c
rd885a58 r5510027 663 663 __cfaabi_dbg_print_safe("Kernel : Processor %p ready to sleep\n", this); 664 664 665 verify( ({int sval = 0; sem_getvalue(&this->idleLock, &sval); sval; }) < 65536); 666 sem_wait(&idleLock); 665 verify( ({int sval = 0; sem_getvalue(&this->idleLock, &sval); sval; }) < 200); 666 int __attribute__((unused)) ret = sem_wait(&idleLock); 667 verify(ret > 0 || errno == EINTR); 667 668 668 669 __cfaabi_dbg_print_safe("Kernel : Processor %p woke up and ready to run\n", this); … … 678 679 void wake(processor * this) { 679 680 __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); 681 int __attribute__((unused)) ret = sem_post(&this->idleLock); 682 verify(ret > 0 || errno == EINTR); 683 verify( ({int sval = 0; sem_getvalue(&this->idleLock, &sval); sval; }) < 200); 682 684 } 683 685
Note: See TracChangeset
for help on using the changeset viewer.