apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wr...@apache.org
Subject cvs commit: apr/include apr_shmem.h
Date Sat, 05 Jan 2002 08:03:53 GMT
wrowe       02/01/05 00:03:53

  Modified:    shmem/beos shmem.c
               shmem/os2 shmem.c
               shmem/unix shmem.c
               include  apr_shmem.h
  Log:
    Normalize an opaque type to our current conventions.
  
  Revision  Changes    Path
  1.6       +12 -12    apr/shmem/beos/shmem.c
  
  Index: shmem.c
  ===================================================================
  RCS file: /home/cvs/apr/shmem/beos/shmem.c,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- shmem.c	12 Aug 2001 13:13:55 -0000	1.5
  +++ shmem.c	5 Jan 2002 08:03:53 -0000	1.6
  @@ -69,7 +69,7 @@
       void *prev;
   };
   
  -struct shmem_t {
  +typedef struct apr_shmem_t {
       apr_pool_t *p;
       void *memblock;
       void *ptr;
  @@ -77,7 +77,7 @@
       area_id aid;
       struct block_t *uselist;
       struct block_t *freelist;
  -};
  +} apr_shmem_t;
   
   #define MIN_BLK_SIZE 128
   
  @@ -173,7 +173,7 @@
   }
   
   /* puts a used block onto the free list for it to be reused... */
  -static void free_block(struct shmem_t *m, void *entity)
  +static void free_block(apr_shmem_t *m, void *entity)
   {
       struct block_t *b;
       if ((b = find_block_by_addr(m->uselist, entity)) != NULL){
  @@ -184,7 +184,7 @@
   }
   
   /* assigns a block of our memory and puts an entry on the uselist */
  -static struct block_t *alloc_block(struct shmem_t *m, apr_size_t size)
  +static struct block_t *alloc_block(apr_shmem_t *m, apr_size_t size)
   {
       struct block_t *b = NULL;
       if (m->avail < size)
  @@ -205,14 +205,14 @@
       return b;
   }
   
  -APR_DECLARE(apr_status_t) apr_shm_init(struct shmem_t **m, apr_size_t reqsize, const char
*file, 
  +APR_DECLARE(apr_status_t) apr_shm_init(apr_shmem_t **m, apr_size_t reqsize, const char
*file, 
                                          apr_pool_t *p)
   {
       apr_size_t pagesize;
       area_id newid;
       char *addr;
   
  -    (*m) = (struct shmem_t *)apr_pcalloc(p, sizeof(struct shmem_t));
  +    (*m) = (apr_shmem_t *)apr_pcalloc(p, sizeof(apr_shmem_t));
       /* we MUST allocate in pages, so calculate how big an area we need... */
       pagesize = ((reqsize + B_PAGE_SIZE - 1) / B_PAGE_SIZE) * B_PAGE_SIZE;
       
  @@ -232,7 +232,7 @@
       return APR_SUCCESS;
   }
   
  -APR_DECLARE(apr_status_t) apr_shm_destroy(struct shmem_t *m)
  +APR_DECLARE(apr_status_t) apr_shm_destroy(apr_shmem_t *m)
   {
       delete_area(m->aid);
       m->avail = 0;
  @@ -242,7 +242,7 @@
       return APR_SUCCESS;
   }
   
  -APR_DECLARE(void *) apr_shm_malloc(struct shmem_t *m, apr_size_t reqsize)
  +APR_DECLARE(void *) apr_shm_malloc(apr_shmem_t *m, apr_size_t reqsize)
   {
       struct block_t *b;
       if ((b = alloc_block(m, reqsize)) != NULL)
  @@ -250,7 +250,7 @@
       return NULL;
   }
   
  -APR_DECLARE(void *) apr_shm_calloc(struct shmem_t *m, apr_size_t reqsize)
  +APR_DECLARE(void *) apr_shm_calloc(apr_shmem_t *m, apr_size_t reqsize)
   {
       struct block_t *b; 
       if ((b = alloc_block(m, reqsize)) != NULL){  
  @@ -260,7 +260,7 @@
       return NULL;
   }
   
  -APR_DECLARE(apr_status_t) apr_shm_free(struct shmem_t *m, void *entity)
  +APR_DECLARE(apr_status_t) apr_shm_free(apr_shmem_t *m, void *entity)
   {
       free_block(m, entity);   
       return APR_SUCCESS;
  @@ -277,7 +277,7 @@
       return APR_ANONYMOUS;
   }
   
  -APR_DECLARE(apr_status_t) apr_shm_open(struct shmem_t *m)
  +APR_DECLARE(apr_status_t) apr_shm_open(apr_shmem_t *m)
   {
       /* 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
  @@ -311,7 +311,7 @@
       return APR_SUCCESS;
   }
   
  -APR_DECLARE(apr_status_t) apr_shm_avail(struct shmem_t *m, apr_size_t *size)
  +APR_DECLARE(apr_status_t) apr_shm_avail(apr_shmem_t *m, apr_size_t *size)
   {
       *size = m->avail;
       if (m->avail == 0)
  
  
  
  1.13      +10 -10    apr/shmem/os2/shmem.c
  
  Index: shmem.c
  ===================================================================
  RCS file: /home/cvs/apr/shmem/os2/shmem.c,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- shmem.c	29 Dec 2001 10:00:41 -0000	1.12
  +++ shmem.c	5 Jan 2002 08:03:53 -0000	1.13
  @@ -60,17 +60,17 @@
   #include <umalloc.h>
   #include <stdlib.h>
   
  -struct shmem_t {
  +typedef struct apr_shmem_t {
       void *memblock;
       Heap_t heap;
  -};
  +} apr_shmem_t;
   
   
   
  -APR_DECLARE(apr_status_t) apr_shm_init(struct shmem_t **m, apr_size_t reqsize, const char
*file, apr_pool_t *cont)
  +APR_DECLARE(apr_status_t) apr_shm_init(apr_shmem_t **m, apr_size_t reqsize, const char
*file, apr_pool_t *cont)
   {
       int rc;
  -    struct shmem_t *newm = (struct shmem_t *)apr_palloc(cont, sizeof(struct shmem_t));
  +    apr_shmem_t *newm = (apr_shmem_t *)apr_palloc(cont, sizeof(apr_shmem_t));
       char *name = NULL;
       ULONG flags = PAG_COMMIT|PAG_READ|PAG_WRITE;
   
  @@ -94,7 +94,7 @@
   
   
   
  -APR_DECLARE(apr_status_t) apr_shm_destroy(struct shmem_t *m)
  +APR_DECLARE(apr_status_t) apr_shm_destroy(apr_shmem_t *m)
   {
       _uclose(m->heap);
       _udestroy(m->heap, _FORCE);
  @@ -104,21 +104,21 @@
   
   
   
  -APR_DECLARE(void *) apr_shm_malloc(struct shmem_t *m, apr_size_t reqsize)
  +APR_DECLARE(void *) apr_shm_malloc(apr_shmem_t *m, apr_size_t reqsize)
   {
       return _umalloc(m->heap, reqsize);
   }
   
   
   
  -APR_DECLARE(void *) apr_shm_calloc(struct shmem_t *m, apr_size_t size)
  +APR_DECLARE(void *) apr_shm_calloc(apr_shmem_t *m, apr_size_t size)
   {
       return _ucalloc(m->heap, size, 1);
   }
   
   
   
  -APR_DECLARE(apr_status_t) apr_shm_free(struct shmem_t *m, void *entity)
  +APR_DECLARE(apr_status_t) apr_shm_free(apr_shmem_t *m, void *entity)
   {
       free(entity);
       return APR_SUCCESS;
  @@ -141,7 +141,7 @@
   
   
   
  -APR_DECLARE(apr_status_t) apr_shm_open(struct shmem_t *m)
  +APR_DECLARE(apr_status_t) apr_shm_open(apr_shmem_t *m)
   {
       int rc;
   
  @@ -156,7 +156,7 @@
   
   
   
  -APR_DECLARE(apr_status_t) apr_shm_avail(struct shmem_t *c, apr_size_t *size)
  +APR_DECLARE(apr_status_t) apr_shm_avail(apr_shmem_t *c, apr_size_t *size)
   {
   
       return APR_ENOTIMPL;
  
  
  
  1.35      +2 -2      apr/shmem/unix/shmem.c
  
  Index: shmem.c
  ===================================================================
  RCS file: /home/cvs/apr/shmem/unix/shmem.c,v
  retrieving revision 1.34
  retrieving revision 1.35
  diff -u -r1.34 -r1.35
  --- shmem.c	29 Dec 2001 23:14:22 -0000	1.34
  +++ shmem.c	5 Jan 2002 08:03:53 -0000	1.35
  @@ -89,7 +89,7 @@
   #include <kernel/OS.h>
   #endif
   
  -struct shmem_t {
  +typedef struct apr_shmem_t {
       void *mem;
       void *curmem;
       apr_size_t length;
  @@ -104,7 +104,7 @@
   #elif APR_USE_SHMEM_BEOS
       area_id areaid; 
   #endif
  -};
  +} apr_shmem_t;
   
   APR_DECLARE(apr_status_t) apr_shm_init(apr_shmem_t **m, apr_size_t reqsize, 
                                          const char *filename, apr_pool_t *pool)
  
  
  
  1.19      +1 -1      apr/include/apr_shmem.h
  
  Index: apr_shmem.h
  ===================================================================
  RCS file: /home/cvs/apr/include/apr_shmem.h,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- apr_shmem.h	18 Aug 2001 15:15:46 -0000	1.18
  +++ apr_shmem.h	5 Jan 2002 08:03:53 -0000	1.19
  @@ -83,7 +83,7 @@
   typedef   void           apr_shm_name_t;
   #endif
   
  -typedef   struct shmem_t apr_shmem_t;
  +typedef   struct apr_shmem_t apr_shmem_t;
   
   /**
    * Create a pool of shared memory for use later.
  
  
  

Mime
View raw message