spinlock: rename functions

This commit is contained in:
Matheus
2025-08-15 22:54:28 -03:00
parent 0c6a00bc6b
commit 938612e82e
8 changed files with 82 additions and 22 deletions
+2 -2
View File
@@ -29,7 +29,7 @@ syscallret_t syscall_killthread(context_t *context, int pid, int tid, int signal
}
bool ok = false;
bool intstatus = spinlock_acquireirqclear(&target->threadlistlock);
bool intstatus = spinlock_acquire_irq_clear(&target->threadlistlock);
thread_t *thread = target->threadlist;
while (thread) {
@@ -42,7 +42,7 @@ syscallret_t syscall_killthread(context_t *context, int pid, int tid, int signal
thread = thread->procnext;
}
spinlock_releaseirqrestore(&target->threadlistlock, intstatus);
spinlock_release_irq_restore(&target->threadlistlock, intstatus);
if (ok == false) {
ret.errno = ESRCH;
+2 -2
View File
@@ -97,11 +97,11 @@ void timer_isr(timer_t *timer, context_t *context) {
}
time_t timer_get_ticks(timer_t *timer) {
long ipl = spinlock_acquireraiseipl(&timer->lock, IPL_TIMER);
long ipl = spinlock_acquire_raise_ipl(&timer->lock, IPL_TIMER);
time_t ticks = timer->tickcurrent + timer->time_passed(timer);
spinlock_releaseloweripl(&timer->lock, ipl);
spinlock_release_lower_ipl(&timer->lock, ipl);
return ticks;
}
+2 -2
View File
@@ -23,7 +23,7 @@ topology_node_t *topology_create_node(void) {
}
void topology_insert(topology_node_t *node, topology_node_t *parent, int id, cpu_t *cpu) {
long old_ipl = spinlock_acquireraiseipl(&tree_lock, IPL_MAX);
long old_ipl = spinlock_acquire_raise_ipl(&tree_lock, IPL_MAX);
node->id = id;
node->cpu = cpu;
@@ -32,5 +32,5 @@ void topology_insert(topology_node_t *node, topology_node_t *parent, int id, cpu
node->sibling = node->parent->children;
node->parent->children = node;
spinlock_releaseloweripl(&tree_lock, old_ipl);
spinlock_release_lower_ipl(&tree_lock, old_ipl);
}