blk_cache: remove global env accessor usage

Issue #1987.
This commit is contained in:
Josef Söntgen
2017-01-05 15:23:01 +01:00
committed by Norman Feske
parent e960b06214
commit 7cc754191a
2 changed files with 5 additions and 5 deletions

View File

@ -5,7 +5,7 @@
*/ */
/* /*
* Copyright (C) 2013 Genode Labs GmbH * Copyright (C) 2013-2017 Genode Labs GmbH
* *
* This file is part of the Genode OS framework, which is distributed * This file is part of the Genode OS framework, which is distributed
* under the terms of the GNU General Public License version 2. * under the terms of the GNU General Public License version 2.
@ -317,7 +317,7 @@ class Driver : public Block::Driver
{ {
using namespace Genode; using namespace Genode;
Parent::Resource_args const args = env()->parent()->yield_request(); Parent::Resource_args const args = _env.parent().yield_request();
size_t const requested_ram_quota = size_t const requested_ram_quota =
Arg_string::find_arg(args.string(), "ram_quota").ulong_value(0); Arg_string::find_arg(args.string(), "ram_quota").ulong_value(0);
@ -337,7 +337,7 @@ class Driver : public Block::Driver
: _env(env), : _env(env),
_r_slab(&heap), _r_slab(&heap),
_alloc(&heap, CACHE_BLK_SIZE), _alloc(&heap, CACHE_BLK_SIZE),
_blk(&_alloc, Block::Session::TX_QUEUE_SIZE*CACHE_BLK_SIZE), _blk(_env, &_alloc, Block::Session::TX_QUEUE_SIZE*CACHE_BLK_SIZE),
_blk_sz(0), _blk_sz(0),
_blk_cnt(0), _blk_cnt(0),
_cache(heap, 0), _cache(heap, 0),

View File

@ -5,12 +5,12 @@
*/ */
/* /*
* Copyright (C) 2013 Genode Labs GmbH * Copyright (C) 2013-2017 Genode Labs GmbH
* *
* This file is part of the Genode OS framework, which is distributed * This file is part of the Genode OS framework, which is distributed
* under the terms of the GNU General Public License version 2. * under the terms of the GNU General Public License version 2.
*/ */
#include <base/printf.h>
#include "lru.h" #include "lru.h"
#include "driver.h" #include "driver.h"