Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Remove the need of pthread_mutex in mmalloc, to allow its use with sthread
[simgrid.git] / src / xbt / mmalloc / mmprivate.h
index cddfd15..451c1e6 100644 (file)
@@ -174,9 +174,6 @@ typedef struct {
  * if such a file exists.
  * */
 struct mdesc {
-  /** @brief Mutex locking the access to the heap */
-  pthread_mutex_t mutex;
-
   /** @brief Chained lists of mdescs */
   struct mdesc *next_mdesc;
 
@@ -261,17 +258,6 @@ XBT_PUBLIC_DATA struct mdesc* __mmalloc_default_mdp;
 
 XBT_PUBLIC void* mmorecore(struct mdesc* mdp, ssize_t size);
 
-/** Thread-safety (if the mutex is already created)
- *
- * This is mandatory in the case where the user runs a parallel simulation
- * in a model-checking enabled tree. Without this protection, our malloc
- * implementation will not like multi-threading AT ALL.
- */
-#define LOCK(mdp) pthread_mutex_lock(&(mdp)->mutex)
-#define UNLOCK(mdp) pthread_mutex_unlock(&(mdp)->mutex)
-
-XBT_PRIVATE int malloc_use_mmalloc(void);
-
 XBT_PRIVATE size_t mmalloc_get_bytes_used_remote(size_t heaplimit, const malloc_info* heapinfo);
 
 /* We call dlsym during mmalloc initialization, but dlsym uses malloc.