fastcall void VBE_InitSimple(int width, int height, int bpp) { VBEState *self = &gVBE; int i; if (!VBE_Init()) { Console_Panic("VESA BIOS Extensions not available."); } for (i = 0; i < self->numModes; i++) { uint16 mode = self->modes[i]; VBEModeInfo info; const uint32 requiredAttrs = VBE_MODEATTR_SUPPORTED | VBE_MODEATTR_GRAPHICS | VBE_MODEATTR_LINEAR; VBE_GetModeInfo(mode, &info); if ((info.attributes & requiredAttrs) == requiredAttrs && info.width == width && info.height == height && info.bitsPerPixel == bpp) { VBE_SetMode(mode, VBE_MODEFLAG_LINEAR); return; } } Console_Panic("Can't find the requested video mode."); }
void child_main(void) { setbuf(stdout, NULL); setbuf(stderr, NULL); printf("Child starts\n"); cache_param = heritage.param; AZ(pthread_key_create(&req_key, NULL)); AZ(pthread_key_create(&bo_key, NULL)); AZ(pthread_key_create(&name_key, NULL)); THR_SetName("cache-main"); VSM_Init(); /* First, LCK needs it. */ LCK_Init(); /* Second, locking */ Lck_New(&vxid_lock, lck_vxid); WAIT_Init(); PAN_Init(); CLI_Init(); VFP_Init(); VCL_Init(); HTTP_Init(); VBE_Init(); VBO_Init(); VBE_InitCfg(); VBP_Init(); Pool_Init(); V1P_Init(); EXP_Init(); HSH_Init(heritage.hash); BAN_Init(); VCA_Init(); SMP_Init(); STV_open(); VMOD_Init(); BAN_Compile(); VRND_Seed(); srand48(random()); CLI_AddFuncs(debug_cmds); /* Wait for persistent storage to load if asked to */ if (FEATURE(FEATURE_WAIT_SILO)) SMP_Ready(); Pool_Accept(); CLI_Run(); BAN_Shutdown(); STV_close(); printf("Child dies\n"); }