diff --git a/include/xhyve/lock.h b/include/xhyve/lock.h index 7d33c7f..db30c86 100644 --- a/include/xhyve/lock.h +++ b/include/xhyve/lock.h @@ -29,13 +29,13 @@ #if defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200 /* __MAC_10_12 */ #include #define xhyve_lock_t os_unfair_lock - #define XHYVE_LOCK_INIT(V, LOCK) (V)->LOCK = OS_UNFAIR_LOCK_INIT; + #define XHYVE_LOCK_INIT(V, LOCK) (V)->LOCK = OS_UNFAIR_LOCK_INIT #define XHYVE_LOCK(V, LOCK) os_unfair_lock_lock(&(V)->LOCK) #define XHYVE_UNLOCK(V, LOCK) os_unfair_lock_unlock(&(V)->LOCK) #else #include #define xhyve_lock_t OSSpinLock - #define XHYVE_LOCK_INIT(V, LOCK) (V)->LOCK = OS_SPINLOCK_INIT; + #define XHYVE_LOCK_INIT(V, LOCK) (V)->LOCK = OS_SPINLOCK_INIT #define XHYVE_LOCK(V, LOCK) OSSpinLockLock(&(V)->LOCK) #define XHYVE_UNLOCK(V, LOCK) OSSpinLockUnlock(&(V)->LOCK) #endif diff --git a/src/vmm/io/vatpit.c b/src/vmm/io/vatpit.c index dd66664..fe6c166 100644 --- a/src/vmm/io/vatpit.c +++ b/src/vmm/io/vatpit.c @@ -423,9 +423,9 @@ vatpit_init(struct vm *vm) bzero(vatpit, sizeof(struct vatpit)); vatpit->vm = vm; - VATPIT_LOCK_INIT(vatpit) + VATPIT_LOCK_INIT(vatpit); - FREQ2BT(PIT_8254_FREQ, &bt); + FREQ2BT(PIT_8254_FREQ, &bt) vatpit->freq_sbt = bttosbt(bt); for (i = 0; i < 3; i++) { diff --git a/src/vmm/io/vhpet.c b/src/vmm/io/vhpet.c index 3e13bda..0533437 100644 --- a/src/vmm/io/vhpet.c +++ b/src/vmm/io/vhpet.c @@ -705,7 +705,7 @@ vhpet_init(struct vm *vm) pthread_mutex_init(&vhpet->mtx, NULL); - FREQ2BT(HPET_FREQ, &bt); + FREQ2BT(HPET_FREQ, &bt) vhpet->freq_sbt = bttosbt(bt); pincount = vioapic_pincount(vm); diff --git a/src/vmm/io/vlapic.c b/src/vmm/io/vlapic.c index 62cac32..24d168f 100644 --- a/src/vmm/io/vlapic.c +++ b/src/vmm/io/vlapic.c @@ -232,7 +232,7 @@ vlapic_dcr_write_handler(struct vlapic *vlapic) * XXX changes to the frequency divider will not take effect until * the timer is reloaded. */ - FREQ2BT(((unsigned) (VLAPIC_BUS_FREQ / divisor)), &vlapic->timer_freq_bt); + FREQ2BT(((unsigned) (VLAPIC_BUS_FREQ / divisor)), &vlapic->timer_freq_bt) vlapic->timer_period_bt = vlapic->timer_freq_bt; bintime_mul(&vlapic->timer_period_bt, lapic->icr_timer); @@ -312,7 +312,7 @@ vlapic_get_lvtptr(struct vlapic *vlapic, uint32_t offset) case APIC_OFFSET_LINT1_LVT: case APIC_OFFSET_ERROR_LVT: i = (offset - APIC_OFFSET_TIMER_LVT) >> 2; - return ((&lapic->lvt_timer) + i);; + return ((&lapic->lvt_timer) + i); default: xhyve_abort("vlapic_get_lvt: invalid LVT\n"); } diff --git a/src/vmm/io/vpmtmr.c b/src/vmm/io/vpmtmr.c index 4f237e4..55b2cb2 100644 --- a/src/vmm/io/vpmtmr.c +++ b/src/vmm/io/vpmtmr.c @@ -63,7 +63,7 @@ vpmtmr_init(UNUSED struct vm *vm) vpmtmr->baseuptime = sbinuptime(); vpmtmr->baseval = 0; - FREQ2BT(PMTMR_FREQ, &bt); + FREQ2BT(PMTMR_FREQ, &bt) vpmtmr->freq_sbt = bttosbt(bt); return (vpmtmr); diff --git a/src/vmm/vmm_callout.c b/src/vmm/vmm_callout.c index 73011fe..7ff91e9 100644 --- a/src/vmm/vmm_callout.c +++ b/src/vmm/vmm_callout.c @@ -165,7 +165,7 @@ static void *callout_thread_func(UNUSED void *arg) { /* wait for work */ while (!callout_queue) { pthread_cond_wait(&callout_cnd, &callout_mtx); - }; + } /* get the callout with the nearest timout */ c = callout_queue; @@ -187,7 +187,7 @@ static void *callout_thread_func(UNUSED void *arg) { delta = c->timeout - mat; mat_to_ts(delta, &ts); ret = pthread_cond_timedwait_relative_np(&callout_cnd, &callout_mtx, &ts); - }; + } work = false;