Return-Path: Delivered-To: apmail-apr-cvs-archive@apr.apache.org Received: (qmail 78583 invoked by uid 500); 9 May 2001 16:32:33 -0000 Mailing-List: contact cvs-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Reply-To: dev@apr.apache.org Delivered-To: mailing list cvs@apr.apache.org Received: (qmail 78556 invoked by uid 1103); 9 May 2001 16:32:30 -0000 Date: 9 May 2001 16:32:30 -0000 Message-ID: <20010509163230.78555.qmail@apache.org> From: dreid@apache.org To: apr-cvs@apache.org Subject: cvs commit: apr/shmem/unix shmem.c dreid 01/05/09 09:32:30 Modified: shmem/unix shmem.c Log: BeOS now uses it's own shmem files and doesn't need MM, so this code can be simplified. Revision Changes Path 1.22 +0 -40 apr/shmem/unix/shmem.c Index: shmem.c =================================================================== RCS file: /home/cvs/apr/shmem/unix/shmem.c,v retrieving revision 1.21 retrieving revision 1.22 diff -u -r1.21 -r1.22 --- shmem.c 2001/02/20 20:08:17 1.21 +++ shmem.c 2001/05/09 16:32:26 1.22 @@ -57,15 +57,8 @@ #include "apr_shmem.h" #include "apr_errno.h" -#if BEOS -#include -#endif - struct shmem_t { MM *mm; -#if BEOS - area_id id; -#endif }; apr_status_t apr_shm_init(struct shmem_t **m, apr_size_t reqsize, const char *file, apr_pool_t *cont) @@ -82,9 +75,6 @@ return errno; } (*m)->mm = newmm; -#if BEOS - (*m)->id = area_for((*m)); -#endif return APR_SUCCESS; } @@ -149,36 +139,6 @@ { #if APR_USES_ANONYMOUS_SHM -#if BEOS - /* If we've forked we need a clone of the original area or we - * will only have access to a one time copy of the data made when - * the fork occurred. This strange bit of code fixes that problem! - */ - thread_info ti; - area_info ai; - area_id deleteme = area_for(c); - - /* we need to check which team we're in, so we need to get - * the appropriate info structures for the current thread and - * the area we're using. - */ - get_area_info(c->id, &ai); - get_thread_info(find_thread(NULL), &ti); - - if (ti.team != ai.team){ - area_id nai; - /* if we are in a child then we need to delete the system - * created area as it's a one time copy and won't be a clone - * which is not good. - */ - delete_area(deleteme); - /* now we make our own clone and use that from now on! */ - nai = clone_area(ai.name, &(ai.address), B_CLONE_ADDRESS, - B_READ_AREA | B_WRITE_AREA, ai.area); - get_area_info(nai, &ai); - c = ai.address; - } -#endif /* When using MM, we don't need to open shared memory segments in child * segments, so just return immediately. */