diff options
author | jim <jim@13f79535-47bb-0310-9956-ffa450edef68> | 2014-04-28 13:15:03 +0000 |
---|---|---|
committer | jim <jim@13f79535-47bb-0310-9956-ffa450edef68> | 2014-04-28 13:15:03 +0000 |
commit | 4304247ff979062bf72a8c6acb661d4024ddde3c (patch) | |
tree | 0361df077228ea4b389d250ddc93ef5932c09fd8 /shmem | |
parent | eee17e2fd6c72578e80b668621cbd26dd85c8a02 (diff) | |
download | libapr-4304247ff979062bf72a8c6acb661d4024ddde3c.tar.gz |
Add apr_shm_delete()
r1590624 from trunk
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/1.6.x@1590625 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'shmem')
-rw-r--r-- | shmem/beos/shm.c | 10 | ||||
-rw-r--r-- | shmem/os2/shm.c | 5 | ||||
-rw-r--r-- | shmem/unix/shm.c | 10 | ||||
-rw-r--r-- | shmem/win32/shm.c | 10 |
4 files changed, 35 insertions, 0 deletions
diff --git a/shmem/beos/shm.c b/shmem/beos/shm.c index db94dce32..fcd7c84d1 100644 --- a/shmem/beos/shm.c +++ b/shmem/beos/shm.c @@ -100,6 +100,16 @@ APR_DECLARE(apr_status_t) apr_shm_remove(const char *filename, return APR_SUCCESS; } +APR_DECLARE(apr_status_t) apr_shm_delete(apr_shm_t *m) +{ + if (m->filename) { + return apr_shm_remove(m->filename, m->pool); + } + else { + return APR_ENOTIMPL; + } +} + APR_DECLARE(apr_status_t) apr_shm_attach(apr_shm_t **m, const char *filename, apr_pool_t *pool) diff --git a/shmem/os2/shm.c b/shmem/os2/shm.c index 2df6c6194..091fe5195 100644 --- a/shmem/os2/shm.c +++ b/shmem/os2/shm.c @@ -77,6 +77,11 @@ APR_DECLARE(apr_status_t) apr_shm_remove(const char *filename, return APR_ENOTIMPL; } +APR_DECLARE(apr_status_t) apr_shm_delete(apr_shm_t *m) +{ + return APR_ENOTIMPL; +} + APR_DECLARE(apr_status_t) apr_shm_attach(apr_shm_t **m, const char *filename, apr_pool_t *pool) diff --git a/shmem/unix/shm.c b/shmem/unix/shm.c index 927f97ba6..04e33b6f0 100644 --- a/shmem/unix/shm.c +++ b/shmem/unix/shm.c @@ -491,6 +491,16 @@ shm_remove_failed: #endif } +APR_DECLARE(apr_status_t) apr_shm_delete(apr_shm_t *m) +{ + if (m->filename) { + return apr_shm_remove(m->filename, m->pool); + } + else { + return APR_ENOTIMPL; + } +} + APR_DECLARE(apr_status_t) apr_shm_destroy(apr_shm_t *m) { return apr_pool_cleanup_run(m->pool, m, shm_cleanup_owner); diff --git a/shmem/win32/shm.c b/shmem/win32/shm.c index af0115e44..8d8848edc 100644 --- a/shmem/win32/shm.c +++ b/shmem/win32/shm.c @@ -261,6 +261,16 @@ APR_DECLARE(apr_status_t) apr_shm_remove(const char *filename, return apr_file_remove(filename, pool); } +APR_DECLARE(apr_status_t) apr_shm_delete(apr_shm_t *m) +{ + if (m->filename) { + return apr_shm_remove(m->filename, m->pool); + } + else { + return APR_ENOTIMPL; + } +} + static apr_status_t shm_attach_internal(apr_shm_t **m, const char *file, apr_pool_t *pool, |