Added ldap_pvt_runqueue_find()

This commit is contained in:
Howard Chu 2005-04-19 14:40:30 +00:00
parent 410638fda1
commit dd646eb734
2 changed files with 23 additions and 0 deletions

View File

@ -43,6 +43,13 @@ ldap_pvt_runqueue_insert(
void *arg void *arg
); );
LDAP_F( struct re_s* )
ldap_pvt_runqueue_find(
struct runqueue_s* rq,
ldap_pvt_thread_start_t* routine,
void *arg
);
LDAP_F( void ) LDAP_F( void )
ldap_pvt_runqueue_remove( ldap_pvt_runqueue_remove(
struct runqueue_s* rq, struct runqueue_s* rq,

View File

@ -53,6 +53,22 @@ ldap_pvt_runqueue_insert(
LDAP_STAILQ_INSERT_TAIL( &rq->task_list, entry, tnext ); LDAP_STAILQ_INSERT_TAIL( &rq->task_list, entry, tnext );
} }
struct re_s *
ldap_pvt_runqueue_find(
struct runqueue_s *rq,
ldap_pvt_thread_start_t *routine,
void *arg
)
{
struct re_s* e;
LDAP_STAILQ_FOREACH( e, &rq->task_list, tnext ) {
if ( e->routine == routine && e->arg == arg )
return e;
}
return NULL;
}
void void
ldap_pvt_runqueue_remove( ldap_pvt_runqueue_remove(
struct runqueue_s* rq, struct runqueue_s* rq,