Revert "Make memorypool threadsafe "

This commit is contained in:
Michael Tryby
2018-08-31 11:14:16 -04:00
committed by GitHub
parent 25db9cfe8f
commit d33167161a
8 changed files with 7 additions and 478 deletions

View File

@@ -613,28 +613,6 @@ int DLLEXPORT EN_deleteproject(EN_ProjectHandle *ph)
return 0;
}
int DLLEXPORT EN_runproject(EN_ProjectHandle ph, const char *f1, const char *f2,
const char *f3, void (*pviewprog)(char *))
{
int errcode = 0;
EN_Project *p = NULL;
ERRCODE(EN_open(ph, f1, f2, f3));
p = (EN_Project*)(ph);
p->viewprog = pviewprog;
if (p->out_files.Hydflag != USE) {
ERRCODE(EN_solveH(ph));
}
ERRCODE(EN_solveQ(ph));
ERRCODE(EN_report(ph));
EN_close(ph);
return errcode;
}
int DLLEXPORT EN_init(EN_ProjectHandle ph, char *f2, char *f3,
EN_FlowUnits UnitsType, EN_FormType HeadlossFormula)

View File

@@ -21,12 +21,6 @@
#endif
#include "mempool.h"
#ifdef _MSC_VER
#define THREAD_LOCAL __declspec(thread)
#else
#define THREAD_LOCAL __thread
#endif
/*
** ALLOC_BLOCK_SIZE - adjust this size to suit your installation - it
** should be reasonably large otherwise you will be mallocing a lot.
@@ -60,7 +54,7 @@ typedef struct alloc_root_s
** root - Pointer to the current pool.
*/
THREAD_LOCAL alloc_root_t *root;
static alloc_root_t *root;
/*