committed by
Norman Feske
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);
|
source->release_packet(packet);
|
||||||
}
|
}
|
||||||
destroy(&_tslab_msg, msg);
|
destroy(&_tslab_msg, msg);
|
||||||
@@ -235,7 +235,7 @@ void Seoul::Disk::check_restart()
|
|||||||
if (restarted) {
|
if (restarted) {
|
||||||
destroy(&_tslab_avl, obj);
|
destroy(&_tslab_avl, obj);
|
||||||
} else {
|
} else {
|
||||||
Genode::Lock::Guard lock_guard(_alloc_lock);
|
Genode::Mutex::Guard guard(_alloc_mutex);
|
||||||
_restart_msg.insert(obj);
|
_restart_msg.insert(obj);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -254,7 +254,7 @@ bool Seoul::Disk::restart(struct disk_session const &disk,
|
|||||||
Block::Packet_descriptor packet;
|
Block::Packet_descriptor packet;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
Genode::Lock::Guard lock_guard(_alloc_lock);
|
Genode::Mutex::Guard guard(_alloc_mutex);
|
||||||
|
|
||||||
packet = Block::Packet_descriptor(
|
packet = Block::Packet_descriptor(
|
||||||
disk.blk_con->alloc_packet(blocks * blk_size),
|
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;
|
char * source_addr = nullptr;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
Genode::Lock::Guard lock_guard(_alloc_lock);
|
Genode::Mutex::Guard guard(_alloc_mutex);
|
||||||
|
|
||||||
packet = Block::Packet_descriptor(
|
packet = Block::Packet_descriptor(
|
||||||
disk.blk_con->alloc_packet(blocks * blk_size),
|
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);
|
source->submit_packet(packet);
|
||||||
else {
|
else {
|
||||||
/* failed packet allocation, restart at later point in time */
|
/* 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,
|
_restart_msg.insert(new (&_tslab_avl) Avl_entry(source_addr,
|
||||||
msg_cpy));
|
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(disk_heap(), msg_cpy->dma);
|
||||||
destroy(&_tslab_msg, msg_cpy);
|
destroy(&_tslab_msg, msg_cpy);
|
||||||
if (source_addr) {
|
if (source_addr) {
|
||||||
Genode::Lock::Guard lock_guard(_alloc_lock);
|
Genode::Mutex::Guard guard(_alloc_mutex);
|
||||||
source->release_packet(packet);
|
source->release_packet(packet);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
@@ -415,7 +415,7 @@ bool Seoul::Disk::execute(bool const write, struct disk_session const &disk,
|
|||||||
} else {
|
} else {
|
||||||
destroy(&_tslab_msg, msg_cpy);
|
destroy(&_tslab_msg, msg_cpy);
|
||||||
|
|
||||||
Genode::Lock::Guard lock_guard(_alloc_lock);
|
Genode::Mutex::Guard guard(_alloc_mutex);
|
||||||
source->release_packet(packet);
|
source->release_packet(packet);
|
||||||
}
|
}
|
||||||
return ok;
|
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> _lookup_msg { };
|
||||||
Genode::Avl_tree<Avl_entry> _restart_msg { };
|
Genode::Avl_tree<Avl_entry> _restart_msg { };
|
||||||
/* _alloc_lock protects both lists + alloc_packet/release_packet !!! */
|
/* _alloc_mutex protects both lists + alloc_packet/release_packet !!! */
|
||||||
Genode::Lock _alloc_lock { };
|
Genode::Mutex _alloc_mutex { };
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Noncopyable
|
* Noncopyable
|
||||||
@@ -167,7 +167,7 @@ class Seoul::Disk : public StaticReceiver<Seoul::Disk>
|
|||||||
Avl_entry * lookup_and_remove(Genode::Avl_tree<Avl_entry> &tree,
|
Avl_entry * lookup_and_remove(Genode::Avl_tree<Avl_entry> &tree,
|
||||||
void * specific_obj = nullptr)
|
void * specific_obj = nullptr)
|
||||||
{
|
{
|
||||||
Genode::Lock::Guard lock_guard(_alloc_lock);
|
Genode::Mutex::Guard guard(_alloc_mutex);
|
||||||
|
|
||||||
Avl_entry * obj = tree.first();
|
Avl_entry * obj = tree.first();
|
||||||
if (obj && specific_obj)
|
if (obj && specific_obj)
|
||||||
|
|||||||
@@ -36,8 +36,8 @@ class Late_timeout
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
Genode::Lock _lock { };
|
Genode::Mutex _mutex { };
|
||||||
Remote _remote { };
|
Remote _remote { };
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
@@ -45,7 +45,7 @@ class Late_timeout
|
|||||||
|
|
||||||
void timeout(Clock &clock, MessageTimer const &msg)
|
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();
|
Genode::uint64_t const now = clock.time();
|
||||||
|
|
||||||
@@ -58,7 +58,7 @@ class Late_timeout
|
|||||||
|
|
||||||
Remote reset()
|
Remote reset()
|
||||||
{
|
{
|
||||||
Genode::Lock_guard<Genode::Lock> guard(_lock);
|
Genode::Mutex::Guard guard(_mutex);
|
||||||
|
|
||||||
Remote last = _remote;
|
Remote last = _remote;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user