mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 10:58:12 +00:00
Kernel: Remove the now defunct LOCKER(..)
macro.
This commit is contained in:
parent
0d5827f865
commit
8d6e9fad40
31 changed files with 196 additions and 198 deletions
|
@ -112,7 +112,7 @@ Inode::~Inode()
|
|||
|
||||
void Inode::will_be_destroyed()
|
||||
{
|
||||
LOCKER(m_lock);
|
||||
Locker locker(m_lock);
|
||||
if (m_metadata_dirty)
|
||||
flush_metadata();
|
||||
}
|
||||
|
@ -144,13 +144,13 @@ KResult Inode::decrement_link_count()
|
|||
|
||||
void Inode::set_shared_vmobject(SharedInodeVMObject& vmobject)
|
||||
{
|
||||
LOCKER(m_lock);
|
||||
Locker locker(m_lock);
|
||||
m_shared_vmobject = vmobject;
|
||||
}
|
||||
|
||||
bool Inode::bind_socket(LocalSocket& socket)
|
||||
{
|
||||
LOCKER(m_lock);
|
||||
Locker locker(m_lock);
|
||||
if (m_socket)
|
||||
return false;
|
||||
m_socket = socket;
|
||||
|
@ -159,7 +159,7 @@ bool Inode::bind_socket(LocalSocket& socket)
|
|||
|
||||
bool Inode::unbind_socket()
|
||||
{
|
||||
LOCKER(m_lock);
|
||||
Locker locker(m_lock);
|
||||
if (!m_socket)
|
||||
return false;
|
||||
m_socket = nullptr;
|
||||
|
@ -168,21 +168,21 @@ bool Inode::unbind_socket()
|
|||
|
||||
void Inode::register_watcher(Badge<InodeWatcher>, InodeWatcher& watcher)
|
||||
{
|
||||
LOCKER(m_lock);
|
||||
Locker locker(m_lock);
|
||||
VERIFY(!m_watchers.contains(&watcher));
|
||||
m_watchers.set(&watcher);
|
||||
}
|
||||
|
||||
void Inode::unregister_watcher(Badge<InodeWatcher>, InodeWatcher& watcher)
|
||||
{
|
||||
LOCKER(m_lock);
|
||||
Locker locker(m_lock);
|
||||
VERIFY(m_watchers.contains(&watcher));
|
||||
m_watchers.remove(&watcher);
|
||||
}
|
||||
|
||||
NonnullRefPtr<FIFO> Inode::fifo()
|
||||
{
|
||||
LOCKER(m_lock);
|
||||
Locker locker(m_lock);
|
||||
VERIFY(metadata().is_fifo());
|
||||
|
||||
// FIXME: Release m_fifo when it is closed by all readers and writers
|
||||
|
@ -195,7 +195,7 @@ NonnullRefPtr<FIFO> Inode::fifo()
|
|||
|
||||
void Inode::set_metadata_dirty(bool metadata_dirty)
|
||||
{
|
||||
LOCKER(m_lock);
|
||||
Locker locker(m_lock);
|
||||
|
||||
if (metadata_dirty) {
|
||||
// Sanity check.
|
||||
|
@ -217,7 +217,7 @@ void Inode::set_metadata_dirty(bool metadata_dirty)
|
|||
|
||||
void Inode::did_add_child(const InodeIdentifier& child_id)
|
||||
{
|
||||
LOCKER(m_lock);
|
||||
Locker locker(m_lock);
|
||||
for (auto& watcher : m_watchers) {
|
||||
watcher->notify_child_added({}, child_id);
|
||||
}
|
||||
|
@ -225,7 +225,7 @@ void Inode::did_add_child(const InodeIdentifier& child_id)
|
|||
|
||||
void Inode::did_remove_child(const InodeIdentifier& child_id)
|
||||
{
|
||||
LOCKER(m_lock);
|
||||
Locker locker(m_lock);
|
||||
for (auto& watcher : m_watchers) {
|
||||
watcher->notify_child_removed({}, child_id);
|
||||
}
|
||||
|
@ -235,7 +235,7 @@ KResult Inode::prepare_to_write_data()
|
|||
{
|
||||
// FIXME: It's a poor design that filesystems are expected to call this before writing out data.
|
||||
// We should funnel everything through an interface at the VFS layer so this can happen from a single place.
|
||||
LOCKER(m_lock);
|
||||
Locker locker(m_lock);
|
||||
if (fs().is_readonly())
|
||||
return EROFS;
|
||||
auto metadata = this->metadata();
|
||||
|
@ -248,13 +248,13 @@ KResult Inode::prepare_to_write_data()
|
|||
|
||||
RefPtr<SharedInodeVMObject> Inode::shared_vmobject() const
|
||||
{
|
||||
LOCKER(m_lock);
|
||||
Locker locker(m_lock);
|
||||
return m_shared_vmobject.strong_ref();
|
||||
}
|
||||
|
||||
bool Inode::is_shared_vmobject(const SharedInodeVMObject& other) const
|
||||
{
|
||||
LOCKER(m_lock);
|
||||
Locker locker(m_lock);
|
||||
return m_shared_vmobject.unsafe_ptr() == &other;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue