Changeset 09ccaf5 for src/libcfa/concurrency
- Timestamp:
- Jun 6, 2018, 5:45:04 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:
- 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. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/libcfa/concurrency/kernel.c
r2ee0076 r09ccaf5 16 16 //C Includes 17 17 #include <stddef.h> 18 #include <errno.h> 18 19 extern "C" { 19 20 #include <stdio.h> … … 663 664 __cfaabi_dbg_print_safe("Kernel : Processor %p ready to sleep\n", this); 664 665 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); 667 669 668 670 __cfaabi_dbg_print_safe("Kernel : Processor %p woke up and ready to run\n", this); … … 678 680 void wake(processor * this) { 679 681 __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); 682 685 } 683 686
Note: See TracChangeset
for help on using the changeset viewer.