void mach_t_init(mach_t * initp) { hal_spinlock_lock(&initp->mh_lock); list_init(&initp->mh_list); initp->mh_kerinramstart = KRNL_INRAM_START; initp->mh_kerinramend = (adr_t)(&__end_kernel); initp->mh_mmapdscadr = (mmapdsc_t*)(ALIGN(((uint_t)(&__end_kernel)),4096)); initp->mh_mmapdscnr = 0; initp->mh_spedscnr = PLFM_ADRSPCE_NR; initp->mh_spedsc = machadrspce; initp->mh_intfltdsc = machintflt; initp->mh_intfltnr = IRQ_MAX; return; }
void hal_spinlock_spin(spinlock_t *lock) { hal_spinlock_lock(lock, SpinlockWaitForever); }