mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-21 14:37:50 +00:00
parent
bba4790002
commit
169cad6059
@ -140,7 +140,7 @@ void Seoul::Disk::handle_disk(unsigned disknr)
|
||||
}
|
||||
|
||||
{
|
||||
Genode::Lock::Guard lock_guard(_alloc_lock);
|
||||
Genode::Mutex::Guard guard(_alloc_mutex);
|
||||
source->release_packet(packet);
|
||||
}
|
||||
destroy(&_tslab_msg, msg);
|
||||
@ -235,7 +235,7 @@ void Seoul::Disk::check_restart()
|
||||
if (restarted) {
|
||||
destroy(&_tslab_avl, obj);
|
||||
} else {
|
||||
Genode::Lock::Guard lock_guard(_alloc_lock);
|
||||
Genode::Mutex::Guard guard(_alloc_mutex);
|
||||
_restart_msg.insert(obj);
|
||||
}
|
||||
}
|
||||
@ -254,7 +254,7 @@ bool Seoul::Disk::restart(struct disk_session const &disk,
|
||||
Block::Packet_descriptor packet;
|
||||
|
||||
try {
|
||||
Genode::Lock::Guard lock_guard(_alloc_lock);
|
||||
Genode::Mutex::Guard guard(_alloc_mutex);
|
||||
|
||||
packet = Block::Packet_descriptor(
|
||||
disk.blk_con->alloc_packet(blocks * blk_size),
|
||||
@ -311,7 +311,7 @@ bool Seoul::Disk::execute(bool const write, struct disk_session const &disk,
|
||||
char * source_addr = nullptr;
|
||||
|
||||
try {
|
||||
Genode::Lock::Guard lock_guard(_alloc_lock);
|
||||
Genode::Mutex::Guard guard(_alloc_mutex);
|
||||
|
||||
packet = Block::Packet_descriptor(
|
||||
disk.blk_con->alloc_packet(blocks * blk_size),
|
||||
@ -371,7 +371,7 @@ bool Seoul::Disk::execute(bool const write, struct disk_session const &disk,
|
||||
source->submit_packet(packet);
|
||||
else {
|
||||
/* failed packet allocation, restart at later point in time */
|
||||
Genode::Lock::Guard lock_guard(_alloc_lock);
|
||||
Genode::Mutex::Guard guard(_alloc_mutex);
|
||||
_restart_msg.insert(new (&_tslab_avl) Avl_entry(source_addr,
|
||||
msg_cpy));
|
||||
}
|
||||
@ -382,7 +382,7 @@ bool Seoul::Disk::execute(bool const write, struct disk_session const &disk,
|
||||
destroy(disk_heap(), msg_cpy->dma);
|
||||
destroy(&_tslab_msg, msg_cpy);
|
||||
if (source_addr) {
|
||||
Genode::Lock::Guard lock_guard(_alloc_lock);
|
||||
Genode::Mutex::Guard guard(_alloc_mutex);
|
||||
source->release_packet(packet);
|
||||
}
|
||||
return false;
|
||||
@ -415,7 +415,7 @@ bool Seoul::Disk::execute(bool const write, struct disk_session const &disk,
|
||||
} else {
|
||||
destroy(&_tslab_msg, msg_cpy);
|
||||
|
||||
Genode::Lock::Guard lock_guard(_alloc_lock);
|
||||
Genode::Mutex::Guard guard(_alloc_mutex);
|
||||
source->release_packet(packet);
|
||||
}
|
||||
return ok;
|
||||
|
@ -128,8 +128,8 @@ class Seoul::Disk : public StaticReceiver<Seoul::Disk>
|
||||
|
||||
Genode::Avl_tree<Avl_entry> _lookup_msg { };
|
||||
Genode::Avl_tree<Avl_entry> _restart_msg { };
|
||||
/* _alloc_lock protects both lists + alloc_packet/release_packet !!! */
|
||||
Genode::Lock _alloc_lock { };
|
||||
/* _alloc_mutex protects both lists + alloc_packet/release_packet !!! */
|
||||
Genode::Mutex _alloc_mutex { };
|
||||
|
||||
/*
|
||||
* Noncopyable
|
||||
@ -167,7 +167,7 @@ class Seoul::Disk : public StaticReceiver<Seoul::Disk>
|
||||
Avl_entry * lookup_and_remove(Genode::Avl_tree<Avl_entry> &tree,
|
||||
void * specific_obj = nullptr)
|
||||
{
|
||||
Genode::Lock::Guard lock_guard(_alloc_lock);
|
||||
Genode::Mutex::Guard guard(_alloc_mutex);
|
||||
|
||||
Avl_entry * obj = tree.first();
|
||||
if (obj && specific_obj)
|
||||
|
@ -36,8 +36,8 @@ class Late_timeout
|
||||
|
||||
private:
|
||||
|
||||
Genode::Lock _lock { };
|
||||
Remote _remote { };
|
||||
Genode::Mutex _mutex { };
|
||||
Remote _remote { };
|
||||
|
||||
public:
|
||||
|
||||
@ -45,7 +45,7 @@ class Late_timeout
|
||||
|
||||
void timeout(Clock &clock, MessageTimer const &msg)
|
||||
{
|
||||
Genode::Lock_guard<Genode::Lock> guard(_lock);
|
||||
Genode::Mutex::Guard guard(_mutex);
|
||||
|
||||
Genode::uint64_t const now = clock.time();
|
||||
|
||||
@ -58,7 +58,7 @@ class Late_timeout
|
||||
|
||||
Remote reset()
|
||||
{
|
||||
Genode::Lock_guard<Genode::Lock> guard(_lock);
|
||||
Genode::Mutex::Guard guard(_mutex);
|
||||
|
||||
Remote last = _remote;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user