In os/main.c there is the following sequence of code. With interrupts enabled via spl0 timer interrupts etc. will be able to flow. However, pg_init() is not called until post_startup(). So if an interrupt occurs that requires a change of thread then pg_ev_thread_swtch() will be called without cpu_pg->pgs having been initialized and could cause a segv. Obviously this is not happening as this would be a problem someone would've hit almost immediately. My question is, is this because the window for an interrupt to occur is so small the likelihood that the problem wouldn't be seen? /* * Drop the interrupt level and allow interrupts. At this point * the DDI guarantees that interrupts are enabled. */ (void) spl0(); interrupts_unleashed = 1;
vfs_mountroot(); /* Mount the root file system */ errorq_init(); /* after vfs_mountroot() so DDI root is ready */ cpu_kstat_init(CPU); /* after vfs_mountroot() so TOD is valid */ ddi_walk_devs(ddi_root_node(), pm_adjust_timestamps, NULL); /* after vfs_mountroot() so hrestime is valid */ post_startup(); -- This message posted from opensolaris.org _______________________________________________ opensolaris-code mailing list opensolaris-code@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/opensolaris-code