Changeset a3769cc for libcfa/src/concurrency/kernel.cfa
- Timestamp:
- Sep 14, 2021, 10:21:11 PM (3 years ago)
- Branches:
- ADT, ast-experimental, enum, forall-pointer-decay, master, pthread-emulation, qualifiedEnum
- Children:
- b8454c6
- Parents:
- 347925c (diff), ebb6158 (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
-
libcfa/src/concurrency/kernel.cfa
r347925c ra3769cc 22 22 #include <errno.h> 23 23 #include <stdio.h> 24 #include <string.h> 24 25 #include <signal.h> 25 26 #include <unistd.h> … … 31 32 #include "kernel_private.hfa" 32 33 #include "preemption.hfa" 34 #include "strstream.hfa" 35 #include "device/cpu.hfa" 33 36 34 37 //Private includes … … 231 234 __cfadbg_print_safe(runtime_core, "Kernel : core %p waiting on eventfd %d\n", this, this->idle); 232 235 233 __disable_interrupts_hard(); 234 eventfd_t val; 235 eventfd_read( this->idle, &val ); 236 __enable_interrupts_hard(); 236 { 237 eventfd_t val; 238 ssize_t ret = read( this->idle, &val, sizeof(val) ); 239 if(ret < 0) { 240 switch((int)errno) { 241 case EAGAIN: 242 #if EAGAIN != EWOULDBLOCK 243 case EWOULDBLOCK: 244 #endif 245 case EINTR: 246 // No need to do anything special here, just assume it's a legitimate wake-up 247 break; 248 default: 249 abort( "KERNEL : internal error, read failure on idle eventfd, error(%d) %s.", (int)errno, strerror( (int)errno ) ); 250 } 251 } 252 } 237 253 238 254 #if !defined(__CFA_NO_STATISTICS__)
Note: See TracChangeset
for help on using the changeset viewer.