mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-01-18 11:05:48 +08:00
Add "defer" arg to ldap_pvt_runqueue_resched to suspend scheduling of
a task in the queue without removing it.
This commit is contained in:
parent
b51cd87a22
commit
45c42630db
@ -73,7 +73,8 @@ ldap_pvt_runqueue_isrunning(
|
||||
LDAP_F( void )
|
||||
ldap_pvt_runqueue_resched(
|
||||
struct runqueue_s* rq,
|
||||
struct re_s* entry
|
||||
struct re_s* entry,
|
||||
int defer
|
||||
);
|
||||
|
||||
LDAP_F( int )
|
||||
|
@ -118,7 +118,8 @@ ldap_pvt_runqueue_isrunning(
|
||||
void
|
||||
ldap_pvt_runqueue_resched(
|
||||
struct runqueue_s* rq,
|
||||
struct re_s* entry
|
||||
struct re_s* entry,
|
||||
int defer
|
||||
)
|
||||
{
|
||||
struct re_s* prev;
|
||||
@ -133,7 +134,7 @@ ldap_pvt_runqueue_resched(
|
||||
|
||||
LDAP_STAILQ_REMOVE( &rq->task_list, entry, re_s, tnext );
|
||||
|
||||
if ( entry->interval.tv_sec ) {
|
||||
if ( entry->interval.tv_sec && !defer ) {
|
||||
entry->next_sched.tv_sec = time( NULL ) + entry->interval.tv_sec;
|
||||
} else {
|
||||
entry->next_sched.tv_sec = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user