mirror of
https://github.com/Mathewnd/Astral.git
synced 2026-10-28 13:18:22 +00:00
kernel: phase out interruptible mutexes in preparation for new lock
This commit is contained in:
@@ -457,11 +457,11 @@ void uacpi_kernel_free_mutex(uacpi_handle mut) {
|
||||
uacpi_status uacpi_kernel_acquire_mutex(
|
||||
uacpi_handle mut, uacpi_u16 timeout) {
|
||||
if (timeout == 0xFFFF) {
|
||||
MUTEX_ACQUIRE(mut, true);
|
||||
MUTEX_ACQUIRE(mut, false);
|
||||
return UACPI_STATUS_OK;
|
||||
}
|
||||
|
||||
bool didacquire = MUTEX_ACQUIRE_TIMED(mut, timeout * 1000, true);
|
||||
bool didacquire = MUTEX_ACQUIRE_TIMED(mut, timeout * 1000, false);
|
||||
return didacquire ? UACPI_STATUS_OK : UACPI_STATUS_TIMEOUT;
|
||||
}
|
||||
|
||||
|
||||
@@ -266,7 +266,7 @@ int arp_lookup(netdev_t *netdev, uint32_t ip, mac_t *mac) {
|
||||
|
||||
MUTEX_RELEASE(&cachelock);
|
||||
int timedout = EVENT_WAIT(&eventlistener, to);
|
||||
MUTEX_ACQUIRE(&cachelock, true);
|
||||
MUTEX_ACQUIRE(&cachelock, false);
|
||||
time = timekeeper_time();
|
||||
|
||||
if (get(netdev, ip, mac) == 0) {
|
||||
|
||||
Reference in New Issue
Block a user