]> git.sur5r.net Git - openldap/commitdiff
Added ldap_pvt_runqueue_find()
authorHoward Chu <hyc@openldap.org>
Tue, 19 Apr 2005 14:40:30 +0000 (14:40 +0000)
committerHoward Chu <hyc@openldap.org>
Tue, 19 Apr 2005 14:40:30 +0000 (14:40 +0000)
include/ldap_rq.h
libraries/libldap_r/rq.c

index d23c1d2535b2bea66a7d8859512e5e6ca32a5871..551a1eada7bd1fb5fd7c03423e52f38d3adbfd7f 100644 (file)
@@ -43,6 +43,13 @@ ldap_pvt_runqueue_insert(
        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_pvt_runqueue_remove(
        struct runqueue_s* rq,
index 85ae1aa2db99e810132c88174e5e37ad83bdcac1..bafb12166d62aa8ae70ed4ce7d859217089c0a08 100644 (file)
@@ -53,6 +53,22 @@ ldap_pvt_runqueue_insert(
        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
 ldap_pvt_runqueue_remove(
        struct runqueue_s* rq,