Forgive my poor eyesight, but are we actually defining an apr_os_dso_t
anywhere?

A snippit from apr_portable.h

#elif defined(__BEOS__)
#include <kernel/OS.h>

struct apr_os_lock_t {
/* Inter proc */
sem_id sem_interproc;
int32  ben_interproc;
/* Intra Proc */
sem_id sem_intraproc;
int32  ben_intraproc;
};

typedef int                   apr_os_file_t;
typedef DIR                   apr_os_dir_t;
typedef int                   apr_os_sock_t;
typedef struct apr_os_lock_t  apr_os_lock_t;
typedef thread_id             apr_os_thread_t;
typedef thread_id             apr_os_proc_t;
typedef int                   apr_os_threadkey_t;
typedef struct timeval        apr_os_imp_time_t;
typedef struct tm             apr_os_exp_time_t;

#else
/* Any other OS should go above this one.  This is the lowest common
 * denominator typedefs for  all UNIX-like systems.  :)
 */

#ifdef NEED_UNION_SEMUN
/* it makes no sense, but this isn't defined on solaris */
union semun {
    long val;
    struct semid_ds *buf;
    ushort *array;
};
#endif

struct apr_os_lock_t {
#if APR_USE_SYSVSEM_SERIALIZE
    int crossproc;
#elif APR_USE_FCNTL_SERIALIZE
    int crossproc;
#elif APR_USE_PROC_PTHREAD_SERIALIZE
    pthread_mutex_t *crossproc;
#elif APR_USE_FLOCK_SERIALIZE
    int crossproc;
#else
    /* No Interprocess serialization, too bad. */
#endif
#if APR_HAS_THREADS
    /* If no threads, no need for thread locks */
#if APR_USE_PTHREAD_SERIALIZE
    pthread_mutex_t *intraproc;
#endif
#endif
};

typedef int                   apr_os_file_t;
typedef DIR                   apr_os_dir_t;
typedef int                   apr_os_sock_t;
typedef struct apr_os_lock_t  apr_os_lock_t;
#if APR_HAS_THREADS && APR_HAVE_PTHREAD_H
typedef pthread_t             apr_os_thread_t;
typedef pthread_key_t         apr_os_threadkey_t;
#endif
typedef pid_t                 apr_os_proc_t;
typedef struct timeval        apr_os_imp_time_t;
typedef struct tm             apr_os_exp_time_t;
#endif


Now I don't see that we've actually talked about apr_os_dso_t's at any point
in this file and I'm not sure it's even been added to APR and as such that's
probably what we should be doing!  Then we simply follow the API we already
have don't we?

Sorry if I'm missing something here but I've had a touch of sunstroke!!

david

(copied to doug first and then to the list as reply-all got me again!) :)
----- Original Message -----
From: "Doug MacEachern" <[EMAIL PROTECTED]>
To: "David Reid" <[EMAIL PROTECTED]>
Cc: "APR Development List" <dev@apr.apache.org>
Sent: Wednesday, April 18, 2001 7:40 PM
Subject: Re: apr_dso_make??


> On Wed, 18 Apr 2001, David Reid wrote:
>
> > Remind me again, why aren't we just going to add apr_dso_os_put (or
whatever
> > combination of the bits in the correct order is these days) and the _get
> > version to use apr_os_dso_t's?  That *would* keep us in line with the
rest
> > of the APR API wouldn't it?
>
> since apr_dso_handle_t is an incomplete type, we need to `make' an
> apr_dso_handle_t:
>
> apr_dso_handle_t *dso;
> status = apr_dso_make(p, &dso, (void *)native_handle); /* will alloc *dso
*/
>
> i suppose it should be:
>
> status = apr_dso_make(p, &dso);
> apr_os_dso_handle_put(dso, (void *)native_handle);
>
> and perhaps:
> void *os_handle = apr_os_dso_handle_get(dso);
>

Reply via email to