os: use Mutex/Blockade

Issue #3612
This commit is contained in:
Alexander Boettcher
2020-02-20 15:47:08 +01:00
committed by Christian Helmuth
parent 3956530634
commit 22d71d5a8b
21 changed files with 119 additions and 120 deletions

View File

@ -492,7 +492,7 @@ class Vfs::Tar_file_system : public File_system
struct Num_dirent_cache
{
Lock lock { };
Mutex mutex { };
Node &root_node;
bool valid; /* true after first lookup */
char key[256]; /* key used for lookup */
@ -503,7 +503,7 @@ class Vfs::Tar_file_system : public File_system
file_size num_dirent(char const *path)
{
Lock::Guard guard(lock);
Mutex::Guard guard(mutex);
/* check for cache miss */
if (!valid || strcmp(path, key) != 0) {