diff options
author | Michal Zidek <mzidek@redhat.com> | 2014-07-07 17:45:45 +0200 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2014-07-31 11:52:13 +0200 |
commit | b39098de5bbb7513d5509fb30a3096a3bd9d43f2 (patch) | |
tree | dbd5883064330139f87b023b0ffecfa3c5371147 /src/providers/dp_ptask.h | |
parent | ab0ab5a30379b84d6e05e1f2dc457bd1dd97401f (diff) | |
download | sssd-b39098de5bbb7513d5509fb30a3096a3bd9d43f2.tar.gz sssd-b39098de5bbb7513d5509fb30a3096a3bd9d43f2.tar.xz sssd-b39098de5bbb7513d5509fb30a3096a3bd9d43f2.zip |
ptask: Add backoff feature to the ptask api.
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
Reviewed-by: Simo Sorce <simo@redhat.com>
Diffstat (limited to 'src/providers/dp_ptask.h')
-rw-r--r-- | src/providers/dp_ptask.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/providers/dp_ptask.h b/src/providers/dp_ptask.h index 0f9873804..1b931010b 100644 --- a/src/providers/dp_ptask.h +++ b/src/providers/dp_ptask.h @@ -83,6 +83,12 @@ typedef errno_t * * The random_offset is maximum number of seconds added to the * expected delay. Set to 0 if no randomization is needed. + + * If max_backoff is not 0 then the period is doubled + * every time the task is scheduled. The maximum value of + * period is max_backoff. The value of period will be reset to + * original value when the task is disabled. With max_backoff + * set to zero, this feature is disabled. * * If an internal error occurred, the task is automatically disabled. */ @@ -94,6 +100,7 @@ errno_t be_ptask_create(TALLOC_CTX *mem_ctx, time_t random_offset, time_t timeout, enum be_ptask_offline offline, + time_t max_backoff, be_ptask_send_t send_fn, be_ptask_recv_t recv_fn, void *pvt, @@ -108,6 +115,7 @@ errno_t be_ptask_create_sync(TALLOC_CTX *mem_ctx, time_t random_offset, time_t timeout, enum be_ptask_offline offline, + time_t max_backoff, be_ptask_sync_t fn, void *pvt, const char *name, |