Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
bf0bac7d028559d1082b96192224292406e26e58
[simgrid.git] / org / simgrid / msg / Mutex.java
1 package org.simgrid.msg;
2 /** A mutex  implemented on top of SimGrid synchronization mechanisms. 
3  * You can use it exactly the same way that you use the mutexes, 
4  * but to handle the interactions between the threads within the simulation.   
5  * 
6  * Copyright 2012 The SimGrid team. All right reserved. 
7  *
8  * This program is free software; you can redistribute 
9  * it and/or modify it under the terms of the license 
10  * (GNU LGPL) which comes with this package.
11  *
12  */
13 public class Mutex {
14         private long bind; // The C object -- don't touch it
15         
16         public Mutex(int capa) {
17                 init(capa);
18         }
19         private native void init(int capacity);
20         public native void acquire();
21         public native void release();
22 }