Return-Path: Delivered-To: apmail-apr-dev-archive@apr.apache.org Received: (qmail 31470 invoked by uid 500); 18 Apr 2001 18:53:34 -0000 Mailing-List: contact dev-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Delivered-To: mailing list dev@apr.apache.org Received: (qmail 31336 invoked from network); 18 Apr 2001 18:53:31 -0000 Message-ID: <02e701c0c838$97b996a0$6400a8c0@godzilla> From: "David Reid" To: "APR Development List" References: Subject: Re: apr_dso_make?? Date: Wed, 18 Apr 2001 19:51:31 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N 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 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" To: "David Reid" Cc: "APR Development List" 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); >