mirror of
https://github.com/Mathewnd/Astral.git
synced 2026-10-30 05:58:22 +00:00
sched: finish preparing scheduler for rewrite
This commit is contained in:
@@ -77,7 +77,7 @@ static void set(netdev_t *netdev, uint32_t ip, mac_t mac, timespec_t time) {
|
||||
|
||||
static void cleanupthreadfn() {
|
||||
for (;;) {
|
||||
sched_sleepus(1000000); // 1 second
|
||||
sched_sleep_us(1000000); // 1 second
|
||||
MUTEX_ACQUIRE(&cachelock, false);
|
||||
timespec_t currtime = timekeeper_time();
|
||||
hashentry_t entrybuffer;
|
||||
|
||||
@@ -138,7 +138,7 @@ static int vionet_sendpacket(netdev_t *internal, netdesc_t desc, mac_t targetmac
|
||||
size_t driveridx = VIO_QUEUE_DRV_IDX(&netdev->txqueue)++;
|
||||
VIO_QUEUE_DRV_RING(&netdev->txqueue)[driveridx % netdev->txqueue.size] = idx;
|
||||
|
||||
sched_preparesleep(false);
|
||||
sched_prepare_sleep(false);
|
||||
netdev->txwait[idx] = current_thread();
|
||||
*netdev->txqueue.notify = 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user