2 * 2012. The SimGrid Team. All rights reserved.
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms of the license (GNU LGPL) which comes with this package.
9 import org.simgrid.msg.Host;
10 import org.simgrid.msg.Msg;
11 import org.simgrid.msg.MsgException;
12 import org.simgrid.msg.Task;
13 import org.simgrid.msg.Process;
15 public class Policeman extends Process {
16 public Policeman(Host host, String name, String[]args) {
17 super(host,name,args);
21 public void main(String[] args) throws MsgException {
24 Msg.info("Wait a bit before migrating the emigrant.");
26 Migration.mutex.acquire();
28 Migration.processToMigrate.migrate(Host.getByName("Jacquelin"));
29 Msg.info("I moved the emigrant");
30 Migration.processToMigrate.resume();