/* * ======== SysMin_flush ======== * Called during SysMin_exit, System_exit or System_flush. */ Void SysMin_flush() { IArg key; key = Gate_enterSystem(); /* * If a wrap occured, we need to flush the "end" of the internal buffer * first to maintain fifo character output order. */ if (module->wrapped == TRUE) { SysMin_outputFunc(module->outbuf + module->outidx, SysMin_bufSize - module->outidx); } SysMin_outputFunc(module->outbuf, module->outidx); module->outidx = 0; module->wrapped = FALSE; Gate_leaveSystem(key); }
/* * ======== SysMin_flush ======== * Called during SysMin_exit, System_exit or System_flush. */ Void SysMin_flush() { /* Using custom circular buffer implementation without resetting write ptr */ #if 0 IArg key; key = Gate_enterSystem(); /* * If a wrap occured, we need to flush the "end" of the internal buffer * first to maintain fifo character output order. */ if (module->wrapped == TRUE) { SysMin_outputFunc(module->outbuf + module->outidx, SysMin_bufSize - module->outidx); } SysMin_outputFunc(module->outbuf, module->outidx); module->outidx = 0; module->wrapped = FALSE; Gate_leaveSystem(key); #endif }