Changeset 54cc2bf for libcfa/src/concurrency/io
- Timestamp:
- Jan 14, 2021, 7:42:53 PM (4 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- f756a7f
- Parents:
- 7836dad (diff), 7222630 (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/io/setup.cfa
r7836dad r54cc2bf 314 314 } 315 315 316 extern void __disable_interrupts_hard(); 317 extern void __enable_interrupts_hard(); 318 316 319 static void __io_create( __io_data & this, const io_context_params & params_in ) { 317 320 // Step 1 : call to setup … … 429 432 430 433 // Step 4 : eventfd 431 int efd; 432 for() { 433 efd = eventfd(0, 0); 434 if (efd < 0) { 435 if (errno == EINTR) continue; 436 abort("KERNEL ERROR: IO_URING EVENTFD - %s\n", strerror(errno)); 437 } 438 break; 439 } 440 441 int ret; 442 for() { 443 ret = syscall( __NR_io_uring_register, fd, IORING_REGISTER_EVENTFD, &efd, 1); 444 if (ret < 0) { 445 if (errno == EINTR) continue; 446 abort("KERNEL ERROR: IO_URING EVENTFD REGISTER - %s\n", strerror(errno)); 447 } 448 break; 449 } 434 // io_uring_register is so f*cking slow on some machine that it 435 // will never succeed if preemption isn't hard blocked 436 __disable_interrupts_hard(); 437 438 int efd = eventfd(0, 0); 439 if (efd < 0) { 440 abort("KERNEL ERROR: IO_URING EVENTFD - %s\n", strerror(errno)); 441 } 442 443 int ret = syscall( __NR_io_uring_register, fd, IORING_REGISTER_EVENTFD, &efd, 1); 444 if (ret < 0) { 445 abort("KERNEL ERROR: IO_URING EVENTFD REGISTER - %s\n", strerror(errno)); 446 } 447 448 __enable_interrupts_hard(); 450 449 451 450 // some paranoid checks
Note: See TracChangeset
for help on using the changeset viewer.