mirror of
https://github.com/justinian/jsix.git
synced 2025-12-10 08:24: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:
@@ -30,7 +30,7 @@ bsf(uint64_t v)
|
||||
size_t
|
||||
frame_allocator::allocate(size_t count, uintptr_t *address)
|
||||
{
|
||||
kutil::scoped_lock lock {m_lock};
|
||||
util::scoped_lock lock {m_lock};
|
||||
|
||||
for (long i = m_count - 1; i >= 0; --i) {
|
||||
frame_block &block = m_blocks[i];
|
||||
@@ -80,7 +80,7 @@ frame_allocator::allocate(size_t count, uintptr_t *address)
|
||||
void
|
||||
frame_allocator::free(uintptr_t address, size_t count)
|
||||
{
|
||||
kutil::scoped_lock lock {m_lock};
|
||||
util::scoped_lock lock {m_lock};
|
||||
|
||||
kassert(address % frame_size == 0, "Trying to free a non page-aligned frame!");
|
||||
|
||||
@@ -118,7 +118,7 @@ frame_allocator::free(uintptr_t address, size_t count)
|
||||
void
|
||||
frame_allocator::used(uintptr_t address, size_t count)
|
||||
{
|
||||
kutil::scoped_lock lock {m_lock};
|
||||
util::scoped_lock lock {m_lock};
|
||||
|
||||
kassert(address % frame_size == 0, "Trying to mark a non page-aligned frame!");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user