diff options
author | David Reid <dreid@apache.org> | 2001-05-09 16:32:26 +0000 |
---|---|---|
committer | David Reid <dreid@apache.org> | 2001-05-09 16:32:26 +0000 |
commit | 64f6e4c98ea36d10de85727ad4b03bc2f2820203 (patch) | |
tree | ee352f44603c7dae7deb79bce116a7db2b3fe976 /shmem | |
parent | 19fb137f9f605fca230894065d3762bee184ed1b (diff) | |
download | apr-64f6e4c98ea36d10de85727ad4b03bc2f2820203.tar.gz |
BeOS now uses it's own shmem files and doesn't need MM, so this code
can be simplified.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@61597 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'shmem')
-rw-r--r-- | shmem/unix/shmem.c | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/shmem/unix/shmem.c b/shmem/unix/shmem.c index 564784286..a9c5d01f0 100644 --- a/shmem/unix/shmem.c +++ b/shmem/unix/shmem.c @@ -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 @@ apr_status_t apr_shm_init(struct shmem_t **m, apr_size_t reqsize, const char *fi return errno; } (*m)->mm = newmm; -#if BEOS - (*m)->id = area_for((*m)); -#endif return APR_SUCCESS; } @@ -149,36 +139,6 @@ apr_status_t apr_shm_open(struct shmem_t *c) { #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. */ |