summaryrefslogtreecommitdiff
path: root/shmem
diff options
context:
space:
mode:
authorJim Jagielski <jim@apache.org>2014-04-28 13:14:45 +0000
committerJim Jagielski <jim@apache.org>2014-04-28 13:14:45 +0000
commitd80c76dc4b5a2e2ff52d3b3fef39d09c85b989d3 (patch)
treedfd16e36a3c2f48f5f1f2d0be1a8dd6c21b1716d /shmem
parentde420cf010b9ea111e8119814cc9a7071186139b (diff)
downloadapr-d80c76dc4b5a2e2ff52d3b3fef39d09c85b989d3.tar.gz
Add apr_shm_delete()
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1590624 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'shmem')
-rw-r--r--shmem/beos/shm.c10
-rw-r--r--shmem/os2/shm.c5
-rw-r--r--shmem/unix/shm.c10
-rw-r--r--shmem/win32/shm.c10
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 81de941c2..b6ef7811a 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 91b620a75..f93efb5fc 100644
--- a/shmem/unix/shm.c
+++ b/shmem/unix/shm.c
@@ -492,6 +492,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 28ce9406b..b01411ebd 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,