Ejemplo n.º 1
0
    def __check_system(self):
        running = lu.all_tasks()
        if running:
            raise SystemCorrupted("%d tasks already running!" % running)

        sched = lu.scheduler()
        if sched != "Linux":
            raise SystemCorrupted("Scheduler is %s, should be Linux" % sched)
Ejemplo n.º 2
0
    def __to_linux(self):
        msgs = []

        sched = lu.scheduler()
        if sched != "Linux":
            self.log("Switching back to Linux scheduler")
            try:
                lu.switch_scheduler("Linux")
            except:
                msgs += ["Scheduler is %s, cannot switch to Linux!" % sched]

        running = lu.all_tasks()
        if running:
            msgs += ["%d real-time tasks still running!" % running]

        if msgs:
            raise SystemCorrupted("\n".join(msgs))
Ejemplo n.º 3
0
    def __to_linux(self):
        msgs = []

        sched = lu.scheduler()
        if sched != "Linux":
            self.log("Switching back to Linux scheduler")
            try:
                lu.switch_scheduler("Linux")
            except:
                msgs += ["Scheduler is %s, cannot switch to Linux!" % sched]

        running = lu.all_tasks()
        if running:
            msgs += ["%d real-time tasks still running!" % running]

        if msgs:
            raise SystemCorrupted("\n".join(msgs))