- File:
-
- 1 edited
-
libcfa/src/concurrency/io/setup.cfa (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/concurrency/io/setup.cfa
ra757ba1 r19cb0cb 34 34 bool __cfa_io_flush( processor * proc ) { return false; } 35 35 bool __cfa_io_drain( processor * proc ) __attribute__((nonnull (1))) { return false; } 36 void __cfa_io_idle ( processor * ) __attribute__((nonnull (1))) {} 36 37 void __cfa_io_stop ( processor * proc ) {} 37 38 … … 316 317 } 317 318 319 //============================================================================================= 320 // I/O Context Sleep 321 //============================================================================================= 322 // static inline void __epoll_ctl(io_context$ & ctx, int op, const char * error) { 323 // struct epoll_event ev; 324 // ev.events = EPOLLIN | EPOLLONESHOT; 325 // ev.data.u64 = (__u64)&ctx; 326 // int ret = epoll_ctl(iopoll.epollfd, op, ctx.efd, &ev); 327 // if (ret < 0) { 328 // abort( "KERNEL ERROR: EPOLL %s - (%d) %s\n", error, (int)errno, strerror(errno) ); 329 // } 330 // } 331 332 // static void __epoll_register(io_context$ & ctx) { 333 // __epoll_ctl(ctx, EPOLL_CTL_ADD, "ADD"); 334 // } 335 336 // static void __epoll_unregister(io_context$ & ctx) { 337 // // Read the current epoch so we know when to stop 338 // size_t curr = __atomic_load_n(&iopoll.epoch, __ATOMIC_SEQ_CST); 339 340 // // Remove the fd from the iopoller 341 // __epoll_ctl(ctx, EPOLL_CTL_DEL, "REMOVE"); 342 343 // // Notify the io poller thread of the shutdown 344 // iopoll.run = false; 345 // sigval val = { 1 }; 346 // pthread_sigqueue( iopoll.thrd, SIGUSR1, val ); 347 348 // // Make sure all this is done 349 // __atomic_thread_fence(__ATOMIC_SEQ_CST); 350 351 // // Wait for the next epoch 352 // while(curr == iopoll.epoch && !iopoll.stopped) Pause(); 353 // } 354 355 // void __ioctx_prepare_block(io_context$ & ctx) { 356 // __cfadbg_print_safe(io_core, "Kernel I/O - epoll : Re-arming io poller %d (%p)\n", ctx.fd, &ctx); 357 // __epoll_ctl(ctx, EPOLL_CTL_MOD, "REARM"); 358 // } 359 318 360 319 361 //=============================================================================================
Note:
See TracChangeset
for help on using the changeset viewer.