Skip to content
Snippets Groups Projects
Commit 03c9aeed authored by Fredrik Hübinette (Hubbe)'s avatar Fredrik Hübinette (Hubbe)
Browse files

ok, trying to make it work without threads again..

Rev: src/modules/Mird/mird_glue.c:1.6
parent 98a4a9ee
Branches
Tags
Loading
...@@ -104,7 +104,9 @@ static void pmird_no_transaction(void) ...@@ -104,7 +104,9 @@ static void pmird_no_transaction(void)
struct pmird_storage struct pmird_storage
{ {
struct mird *db; struct mird *db;
#ifdef PIKE_THREADS
PIKE_MUTEX_T mutex; PIKE_MUTEX_T mutex;
#endif
}; };
#define THIS ((struct pmird_storage*)(fp->current_storage)) #define THIS ((struct pmird_storage*)(fp->current_storage))
...@@ -112,7 +114,9 @@ struct pmird_storage ...@@ -112,7 +114,9 @@ struct pmird_storage
static void init_pmird(struct object *o) static void init_pmird(struct object *o)
{ {
THIS->db=NULL; THIS->db=NULL;
#ifdef PIKE_THREADS
mt_init(&THIS->mutex); mt_init(&THIS->mutex);
#endif
} }
static void exit_pmird(struct object *o) static void exit_pmird(struct object *o)
...@@ -122,7 +126,9 @@ static void exit_pmird(struct object *o) ...@@ -122,7 +126,9 @@ static void exit_pmird(struct object *o)
mird_free_structure(THIS->db); mird_free_structure(THIS->db);
THIS->db=NULL; THIS->db=NULL;
} }
#ifdef PIKE_THREADS
mt_destroy(&THIS->mutex); mt_destroy(&THIS->mutex);
#endif
} }
/* /*
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment