diff options
Diffstat (limited to 'usr/src/cmd/svc/startd/startd.h')
-rw-r--r-- | usr/src/cmd/svc/startd/startd.h | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/usr/src/cmd/svc/startd/startd.h b/usr/src/cmd/svc/startd/startd.h index c1062e45e0..df3e98a27b 100644 --- a/usr/src/cmd/svc/startd/startd.h +++ b/usr/src/cmd/svc/startd/startd.h @@ -21,7 +21,7 @@ /* * Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2013, Joyent, Inc. All rights reserved. + * Copyright (c) 2015, Joyent, Inc. All rights reserved. */ #ifndef _STARTD_H @@ -82,16 +82,9 @@ extern "C" { #endif -#ifndef NDEBUG -#define bad_error(func, err) { \ - (void) fprintf(stderr, "%s:%d: %s() failed with unexpected " \ - "error %d. Aborting.\n", __FILE__, __LINE__, (func), (err)); \ - abort(); \ -} -#else -#define bad_error(func, err) abort() -#endif - +#define bad_error(func, err) \ + uu_panic("%s:%d: %s() failed with unexpected " \ + "error %d. Aborting.\n", __FILE__, __LINE__, (func), (err)); #define min(a, b) (((a) < (b)) ? (a) : (b)) @@ -405,7 +398,7 @@ typedef enum { #define RINST_RETAKE_MASK 0x0f000000 -#define RINST_START_TIMES 5 /* failures to consider */ +#define RINST_START_TIMES 10 /* up to 10 fails to consider */ #define RINST_FAILURE_RATE_NS 600000000000LL /* 1 failure/10 minutes */ #define RINST_WT_SVC_FAILURE_RATE_NS NANOSEC /* 1 failure/second */ @@ -427,6 +420,8 @@ typedef struct restarter_inst { hrtime_t ri_start_time[RINST_START_TIMES]; uint_t ri_start_index; /* times started */ + uint_t ri_crit_fail_allowed; + hrtime_t ri_crit_fail_period; uu_list_node_t ri_link; pthread_mutex_t ri_lock; |