mirror of
https://github.com/justinian/jsix.git
synced 2025-12-10 00:14:32 -08:00
[util] Replace kutil with util
Now that kutil has no kernel-specific code in it anymore, it can actually be linked to by anything, so I'm renaming it 'util'. Also, I've tried to unify the way that the system libraries from src/libraries are #included using <> instead of "". Other small change: util::bip_buffer got a spinlock to guard against state corruption.
This commit is contained in:
@@ -12,7 +12,7 @@ using level = page_table::level;
|
||||
|
||||
free_page_header * page_table::s_page_cache = nullptr;
|
||||
size_t page_table::s_cache_count = 0;
|
||||
kutil::spinlock page_table::s_lock;
|
||||
util::spinlock page_table::s_lock;
|
||||
constexpr size_t page_table::entry_sizes[4];
|
||||
|
||||
|
||||
@@ -180,7 +180,7 @@ page_table::get_table_page()
|
||||
free_page_header *page = nullptr;
|
||||
|
||||
{
|
||||
kutil::scoped_lock lock(s_lock);
|
||||
util::scoped_lock lock(s_lock);
|
||||
|
||||
if (!s_cache_count)
|
||||
fill_table_page_cache();
|
||||
@@ -199,7 +199,7 @@ page_table::get_table_page()
|
||||
void
|
||||
page_table::free_table_page(page_table *pt)
|
||||
{
|
||||
kutil::scoped_lock lock(s_lock);
|
||||
util::scoped_lock lock(s_lock);
|
||||
free_page_header *page =
|
||||
reinterpret_cast<free_page_header*>(pt);
|
||||
page->next = s_page_cache;
|
||||
|
||||
Reference in New Issue
Block a user