apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dr...@apache.org
Subject cvs commit: apr/shmem/unix shmem.c
Date Wed, 09 May 2001 16:32:30 GMT
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 <kernel/OS.h>
  -#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.
    */
  
  
  

Mime
View raw message