add guard for MirOS to avoid kernel panic.