Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
the supernovae exploded: let's split the archive and move bindings to separate packages
[simgrid.git] / src / java / simgrid / msg / Sem.java
diff --git a/src/java/simgrid/msg/Sem.java b/src/java/simgrid/msg/Sem.java
deleted file mode 100644 (file)
index af1d60b..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-/*\r
- * Simple semaphore implementation, from Doug Lea (public domain)\r
- *\r
- * Copyright 2006,2007,2010 The SimGrid Team           \r
- * All right reserved. \r
- *\r
- * This program is free software; you can redistribute \r
- * it and/or modify it under the terms of the license \r
- *(GNU LGPL) which comes with this package. \r
- */  \r
-\rpackage simgrid.msg;
-\r\rpublic class Sem {\r
-       /******************************************************************/ \r
-       /* Simple semaphore implementation, from Doug Lea (public domain) */ \r
-       /******************************************************************/ \r
-       private int permits_;
-\r      public Sem(int i) {\r            permits_ = i;\r  } \r\r    public void acquire() throws InterruptedException {
-               if (Thread.interrupted())
-                       throw new InterruptedException();
-\r              synchronized(this) {
-                       try {
-                               while (permits_ <= 0)
-                                       wait();
-                               --permits_;
-                       }
-                       catch(InterruptedException ex) {
-                               notify();
-                               throw ex;
-                       }
-               }
-       }
-\r      public synchronized void release() {
-               ++(this.permits_);
-               notify();
-       } \r\r