2 * Copyright 2012 The SimGrid team. All right reserved.
4 * This program is free software; you can redistribute
5 * it and/or modify it under the terms of the license
6 * (GNU LGPL) which comes with this package.
9 package org.simgrid.msg;
10 /** A mutex implemented on top of SimGrid synchronization mechanisms.
11 * You can use it exactly the same way that you use the mutexes,
12 * but to handle the interactions between the processes within the simulation.
16 private long bind; // The C object -- don't touch it
18 public Mutex(int capa) {
21 protected void finalize() {
24 private native void exit();
25 private native void init(int capacity);
26 public native void acquire();
27 public native void release();
30 * Class initializer, to initialize various JNI stuff
32 public static native void nativeInit();