redmine

Fixed building

... ... @@ -150,20 +150,6 @@ enum notifyengine_enum {
};
typedef enum notifyengine_enum notifyengine_t;
#define STATE_STARTING(state_p) (state_p == NULL)
enum state_enum {
STATE_EXIT = 0,
STATE_STARTING,
STATE_RUNNING,
STATE_REHASH,
STATE_PREEXIT,
STATE_TERM,
STATE_THREAD_GC,
STATE_INITSYNC,
STATE_UNKNOWN
};
typedef enum state_enum state_t;
enum threadingmode {
PM_OFF = 0,
PM_SAFE,
... ...
... ... @@ -201,6 +201,20 @@ struct synchandler_args {
};
typedef struct synchandler_args synchandler_args_t;
#define STATE_STARTING(state_p) (state_p == NULL)
enum state_enum {
STATE_EXIT = 0,
STATE_STARTING,
STATE_RUNNING,
STATE_REHASH,
STATE_PREEXIT,
STATE_TERM,
STATE_THREAD_GC,
STATE_INITSYNC,
STATE_UNKNOWN
};
typedef enum state_enum state_t;
struct ctx {
state_t state;
... ...
... ... @@ -1957,7 +1957,8 @@ int main(int argc, char *argv[]) {
debug(4, "debugging flags: %u %u %u %u", ctx_p->flags[OUTPUT_METHOD], ctx_p->flags[QUIET], ctx_p->flags[VERBOSE], ctx_p->flags[DEBUG]);
main_status_update(ctx_p, STATE_STARTING);
ctx_p->state = STATE_STARTING;
main_status_update(ctx_p);
ret = ctx_check(ctx_p);
... ...
... ... @@ -570,7 +570,7 @@ int thread_cleanup(ctx_t *ctx_p) {
return thread_info_unlock(0);
}
int *state_p = NULL;
state_t *state_p = NULL;
int exitcode = 0;
#define SHOULD_THREAD(ctx_p) ((ctx_p->flags[THREADING] != PM_OFF) && (ctx_p->flags[THREADING] != PM_SAFE || ctx_p->iteration_num))
... ... @@ -3115,7 +3115,7 @@ int sync_loop(ctx_t *ctx_p, indexes_t *indexes_p) {
switch (ctx_p->state) {
case STATE_PREEXIT:
main_status_update(ctx_p, state);
main_status_update(ctx_p);
if (ctx_p->flags[PREEXITHOOK])
hook_preexit(ctx_p);
... ... @@ -3140,6 +3140,9 @@ int sync_loop(ctx_t *ctx_p, indexes_t *indexes_p) {
case STATE_EXIT:
main_status_update(ctx_p);
SYNC_LOOP_CONTINUE_UNLOCK;
default:
critical("internal error: ctx_p->state == %u", ctx_p->state);
break;
}
pthread_cond_broadcast(&threadsinfo_p->cond[PTHREAD_MUTEX_STATE]);
... ...
... ... @@ -47,6 +47,5 @@ extern int sync_prequeue_loadmark
struct eventinfo *evinfo
);
extern int sync_prequeue_unload(struct ctx *ctx_p, struct indexes *indexes_p);
extern int *state_p;
extern const char *sync_parameter_get(const char *variable_name, void *_dosync_arg_p);
... ...