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

should now work without threads (I hope)

Rev: src/modules/Mird/mird_glue.c:1.5
parent 61cd755b
Branches
Tags
No related merge requests found
...@@ -33,6 +33,21 @@ struct program *mird_scanner_program; ...@@ -33,6 +33,21 @@ struct program *mird_scanner_program;
#define TRY(X) \ #define TRY(X) \
do { MIRD_RES res; if ( (res=(X)) ) pmird_exception(res); } while (0) do { MIRD_RES res; if ( (res=(X)) ) pmird_exception(res); } while (0)
#ifndef PIKE_THREADS
#define LOCK(PMIRD) \
do \
{ \
struct pmird_storage *me=(PMIRD); \
THREADS_ALLOW();
#define UNLOCK(PMIRD) \
UNSET_ONERROR(err); \
} \
while (0);
#else
#define LOCK(PMIRD) \ #define LOCK(PMIRD) \
do \ do \
{ \ { \
...@@ -56,6 +71,8 @@ static void pmird_unlock(PIKE_MUTEX_T *mutex) ...@@ -56,6 +71,8 @@ static void pmird_unlock(PIKE_MUTEX_T *mutex)
mt_unlock(mutex); mt_unlock(mutex);
} }
#endif
static void pmird_exception(MIRD_RES res) static void pmird_exception(MIRD_RES res)
{ {
char *s,*d; char *s,*d;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment