|
GCC Middle and Back End API Reference
|
#include <lockfile.h>
Public Member Functions | |
| lockfile () | |
| lockfile (std::string filename) | |
| lockfile (lockfile const &o) | |
| void | operator= (lockfile o) |
| int | lock_write () |
| int | try_lock_write () |
| int | lock_read () |
| void | unlock () |
| bool | locked () |
Static Public Member Functions | |
| static bool | lockfile_supported () |
Private Attributes | |
| std::string | filename |
| int | fd |
File locking. Copyright (C) 2023-2025 Free Software Foundation, Inc. This file is part of GCC. GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version. GCC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see <http://www.gnu.org/licenses/>.
Used to synchronize across multiple processes.
|
inline |
References fd.
Referenced by lockfile(), lockfile(), and operator=().
|
inline |
References filename, and lockfile().
|
inline |
References filename, and lockfile().
| int lockfile::lock_read | ( | ) |
| int lockfile::lock_write | ( | ) |
|
inline |
References fd, filename, lockfile(), and unlock().
| int lockfile::try_lock_write | ( | ) |
| void lockfile::unlock | ( | ) |
Unlock all previously placed locks.
Referenced by operator=(), and run_gcc().
|
private |
Referenced by lock_read(), lock_write(), locked(), lockfile(), operator=(), try_lock_write(), and unlock().
|
private |
Referenced by lock_read(), lock_write(), lockfile(), lockfile(), operator=(), and try_lock_write().