MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / PIO_flush

Function PIO_flush

src/jrd/os/posix/unix.cpp:378–406  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

376
377
378void 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

Callers 3

CCH_flushFunction · 0.50
closeDeltaMethod · 0.50
flushDifferenceMethod · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected