inline void ebbrt::out32(uint32_t val, uint16_t port) { #ifdef __linux__ assert(0); #elif __ebbrt__ LRT_ASSERT(0); #endif }
inline uint32_t ebbrt::in32(uint16_t port) { #ifdef __linux__ assert(0); #elif __ebbrt__ LRT_ASSERT(0); #endif return 0; }
void ebbrt::LocalConsole::Write(const char* str, std::function<void()> cb) { #ifdef __linux__ assert(!cb); std::cout << str; #elif __ebbrt__ LRT_ASSERT(!cb); lrt::console::write(str); #endif }
void ebbrt::RemoteConsole::HandleMessage(NetworkId from, Buffer buffer) { #ifdef __linux__ #ifndef __bg__ std::cout << buffer.data(); #else int rank; MPI_Comm_rank(MPI_COMM_WORLD, &rank); if (rank == 0) { std::cout << buffer.data(); } else { assert(0); } #endif #elif __ebbrt__ LRT_ASSERT(0); #endif }