apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kevin seguin <seg...@motive.com>
Subject Re: apr_lock.h lock scope question
Date Fri, 22 Jun 2001 10:01:16 GMT
> > - conditionals and rwlocks (these pretty much go together, and would be
> >   built upon the mutex routines) -- much more heavy than simple mutexes,
> >   but IMHO widely useful throughout httpd and the modules.
> Conditionals weren't portable when I looked at them.  Basically, Windows
> couldn't do them, but I'm not a windows programmer, and I didn't look at
> it too hard.

so, i'm not exactly sure what you guys are talking about when you say
"conditionals", but anyway...  i've recently started looking into using
apr for some stuff, and one of the things i'd like to have but i don't
see there is conditions (like pthread_cond_t) that can be used for
communicating events between threads.  essentially, this:

<psuedo code>

struct apr_condition_t;

APR_DECLARE(apr_status_t) apr_new_condition(apr_condition_t* cond);
APR_DECLARE(apr_status_t) apr_destroy_condition(apr_condition_t* cond);
APR_DECLARE(apr_status_t) apr_condition_wait(apr_condition_t* cond, int
sec, int nsec);
APR_DECLARE(apr_status_t) apr_condition_signal(apr_condition_t* cond);

</psuedo code>

is this similar to what you mean by conditionals?  i have some c code
that implements this that i have used on both windows and unix
(solaris).  the unix side just uses pthreads stuff.

is this kind of functionality already in apr and i'm missing it?  if
not, is it something that others would find useful?  i'd have no problem
donating my existing code ;-)


View raw message