| 376 | |
| 377 | |
| 378 | void PIO_flush(thread_db* tdbb, jrd_file* main_file) |
| 379 | { |
| 380 | /************************************** |
| 381 | * |
| 382 | * P I O _ f l u s h |
| 383 | * |
| 384 | ************************************** |
| 385 | * |
| 386 | * Functional description |
| 387 | * Flush the operating system cache back to good, solid oxide. |
| 388 | * |
| 389 | **************************************/ |
| 390 | |
| 391 | // Since all SUPERSERVER_V2 database and shadow I/O is synchronous, this is a no-op. |
| 392 | #ifndef SUPERSERVER_V2 |
| 393 | |
| 394 | EngineCheckout cout(tdbb, FB_FUNCTION, EngineCheckout::UNNECESSARY); |
| 395 | MutexLockGuard guard(main_file->fil_mutex, FB_FUNCTION); |
| 396 | |
| 397 | for (jrd_file* file = main_file; file; file = file->fil_next) |
| 398 | { |
| 399 | if (file->fil_desc != -1) |
| 400 | { |
| 401 | // This really should be an error |
| 402 | fsync(file->fil_desc); |
| 403 | } |
| 404 | } |
| 405 | #endif |
| 406 | } |
| 407 | |
| 408 | |
| 409 | #ifdef SOLARIS |
no outgoing calls
no test coverage detected