diff options
author | unknown <marko@hundin.mysql.fi> | 2004-05-17 10:49:01 +0300 |
---|---|---|
committer | unknown <marko@hundin.mysql.fi> | 2004-05-17 10:49:01 +0300 |
commit | c004463171bf107b3903977ef02e1e098993ea70 (patch) | |
tree | 64d56b95ad853610566dba3758bacabcbcaf1c2b /innobase | |
parent | fa163d0ba5f5fc22dbadbd66255879ceeb895c27 (diff) | |
download | mariadb-git-c004463171bf107b3903977ef02e1e098993ea70.tar.gz |
InnoDB: Remove unused module os0shm
BitKeeper/deleted/.del-os0shm.h~72e5e03d7b74061f:
Delete: innobase/include/os0shm.h
BitKeeper/deleted/.del-os0shm.c~489ce7f33d07ffa:
Delete: innobase/os/os0shm.c
BitKeeper/deleted/.del-os0shm.ic~1cac6731d2a64d53:
Delete: innobase/include/os0shm.ic
innobase/include/Makefile.am:
Remove unused files os0shm.h and os0shm.ic
innobase/os/Makefile.am:
Remove unused file os0shm.c
innobase/os/makefilewin:
Remove unused file os0shm.c
Diffstat (limited to 'innobase')
-rw-r--r-- | innobase/include/Makefile.am | 2 | ||||
-rw-r--r-- | innobase/include/os0shm.h | 66 | ||||
-rw-r--r-- | innobase/include/os0shm.ic | 10 | ||||
-rw-r--r-- | innobase/os/Makefile.am | 2 | ||||
-rw-r--r-- | innobase/os/makefilewin | 7 | ||||
-rw-r--r-- | innobase/os/os0shm.c | 152 |
6 files changed, 4 insertions, 235 deletions
diff --git a/innobase/include/Makefile.am b/innobase/include/Makefile.am index 2584357e24a..0a9aa928998 100644 --- a/innobase/include/Makefile.am +++ b/innobase/include/Makefile.am @@ -32,7 +32,7 @@ noinst_HEADERS = btr0btr.h btr0btr.ic btr0cur.h btr0cur.ic \ mem0dbg.h mem0dbg.ic mem0mem.h mem0mem.ic mem0pool.h \ mem0pool.ic mtr0log.h mtr0log.ic mtr0mtr.h mtr0mtr.ic \ mtr0types.h os0file.h os0proc.h os0proc.ic \ - os0shm.h os0shm.ic os0sync.h os0sync.ic os0thread.h \ + os0sync.h os0sync.ic os0thread.h \ os0thread.ic page0cur.h page0cur.ic page0page.h \ page0page.ic page0types.h pars0grm.h pars0opt.h \ pars0opt.ic pars0pars.h pars0pars.ic pars0sym.h \ diff --git a/innobase/include/os0shm.h b/innobase/include/os0shm.h deleted file mode 100644 index 250794a976f..00000000000 --- a/innobase/include/os0shm.h +++ /dev/null @@ -1,66 +0,0 @@ -/****************************************************** -The interface to the operating system -shared memory primitives - -(c) 1995 Innobase Oy - -Created 9/23/1995 Heikki Tuuri -*******************************************************/ - -#ifndef os0shm_h -#define os0shm_h - -#include "univ.i" - -typedef void* os_shm_t; - - -/******************************************************************** -Creates an area of shared memory. It can be named so that -different processes may access it in the same computer. -If an area with the same name already exists, returns -a handle to that area (where the size of the area is -not changed even if this call requests a different size). -To use the area, it first has to be mapped to the process -address space by os_shm_map. */ - -os_shm_t -os_shm_create( -/*==========*/ - /* out, own: handle to the shared - memory area, NULL if error */ - ulint size, /* in: area size < 4 GB */ - char* name); /* in: name of the area as a null-terminated - string */ -/*************************************************************************** -Frees a shared memory area. The area can be freed only after it -has been unmapped in all the processes where it was mapped. */ - -ibool -os_shm_free( -/*========*/ - /* out: TRUE if success */ - os_shm_t shm); /* in, own: handle to a shared memory area */ -/*************************************************************************** -Maps a shared memory area in the address space of a process. */ - -void* -os_shm_map( -/*=======*/ - /* out: address of the area, NULL if error */ - os_shm_t shm); /* in: handle to a shared memory area */ -/*************************************************************************** -Unmaps a shared memory area from the address space of a process. */ - -ibool -os_shm_unmap( -/*=========*/ - /* out: TRUE if succeed */ - void* addr); /* in: address of the area */ - - -#ifndef UNIV_NONINL -#include "os0shm.ic" -#endif - -#endif diff --git a/innobase/include/os0shm.ic b/innobase/include/os0shm.ic deleted file mode 100644 index cc267544bc9..00000000000 --- a/innobase/include/os0shm.ic +++ /dev/null @@ -1,10 +0,0 @@ -/****************************************************** -The interface to the operating system -shared memory primitives - -(c) 1995 Innobase Oy - -Created 9/23/1995 Heikki Tuuri -*******************************************************/ - - diff --git a/innobase/os/Makefile.am b/innobase/os/Makefile.am index 132ce07c83b..3b09a10efb5 100644 --- a/innobase/os/Makefile.am +++ b/innobase/os/Makefile.am @@ -19,7 +19,7 @@ include ../include/Makefile.i noinst_LIBRARIES = libos.a -libos_a_SOURCES = os0proc.c os0shm.c os0sync.c os0thread.c os0file.c +libos_a_SOURCES = os0proc.c os0sync.c os0thread.c os0file.c EXTRA_PROGRAMS = diff --git a/innobase/os/makefilewin b/innobase/os/makefilewin index 08dba0e5e47..8bc8d08611b 100644 --- a/innobase/os/makefilewin +++ b/innobase/os/makefilewin @@ -1,7 +1,7 @@ include ..\include\makefile.i -os.lib: os0sync.obj os0thread.obj os0shm.obj os0proc.obj os0file.obj - lib -out:..\libs\os.lib os0sync.obj os0thread.obj os0shm.obj os0proc.obj os0file.obj +os.lib: os0sync.obj os0thread.obj os0proc.obj os0file.obj + lib -out:..\libs\os.lib os0sync.obj os0thread.obj os0proc.obj os0file.obj os0sync.obj: os0sync.c $(CCOM) $(CFLW) -c os0sync.c @@ -9,9 +9,6 @@ os0sync.obj: os0sync.c os0thread.obj: os0thread.c $(CCOM) $(CFLW) -c os0thread.c -os0shm.obj: os0shm.c - $(CCOM) $(CFLW) -c os0shm.c - os0proc.obj: os0proc.c $(CCOM) $(CFLW) -c os0proc.c diff --git a/innobase/os/os0shm.c b/innobase/os/os0shm.c deleted file mode 100644 index f49aa2922b0..00000000000 --- a/innobase/os/os0shm.c +++ /dev/null @@ -1,152 +0,0 @@ -/****************************************************** -The interface to the operating system -shared memory primitives - -(c) 1995 Innobase Oy - -Created 9/23/1995 Heikki Tuuri -*******************************************************/ - -#include "os0shm.h" -#ifdef UNIV_NONINL -#include "os0shm.ic" -#endif - -#ifdef __WIN__ -#include "windows.h" - -typedef HANDLE os_shm_t; -#endif - -/******************************************************************** -Creates an area of shared memory. It can be named so that -different processes may access it in the same computer. -If an area with the same name already exists, returns -a handle to that area (where the size of the area is -not changed even if this call requests a different size). -To use the area, it first has to be mapped to the process -address space by os_shm_map. */ - -os_shm_t -os_shm_create( -/*==========*/ - /* out, own: handle to the shared - memory area, NULL if error */ - ulint size, /* in: area size < 4 GB */ - char* name) /* in: name of the area as a null-terminated - string */ -{ -#ifdef __WIN__ - os_shm_t shm; - - ut_a(name); - ut_a(size > 0); - ut_a(size < 0xFFFFFFFF); - - /* In Windows NT shared memory is created as a memory mapped - file */ - shm = CreateFileMapping((HANDLE)0xFFFFFFFF, /* use operating system - swap file as the backing - file */ - NULL, /* default security - descriptor */ - PAGE_READWRITE, /* allow reading and - writing */ - 0, /* size must be less - than 4 GB */ - (DWORD)size, - name); - return(shm); -#else - UT_NOT_USED(size); - UT_NOT_USED(name); - - return(NULL); -#endif -} - -/*************************************************************************** -Frees a shared memory area. The area can be freed only after it -has been unmapped in all the processes where it was mapped. */ - -ibool -os_shm_free( -/*========*/ - /* out: TRUE if success */ - os_shm_t shm) /* in, own: handle to a shared memory area */ -{ -#ifdef __WIN__ - - BOOL ret; - - ut_a(shm); - - ret = CloseHandle(shm); - - if (ret) { - return(TRUE); - } else { - return(FALSE); - } -#else - UT_NOT_USED(shm); - - return(FALSE); -#endif -} - -/*************************************************************************** -Maps a shared memory area in the address space of a process. */ - -void* -os_shm_map( -/*=======*/ - /* out: address of the area, NULL if error */ - os_shm_t shm) /* in: handle to a shared memory area */ -{ -#ifdef __WIN__ - void* mem; - - ut_a(shm); - - mem = MapViewOfFile(shm, - FILE_MAP_ALL_ACCESS, /* read and write access - allowed */ - 0, /* map from start of */ - 0, /* area */ - 0); /* map the whole area */ - return(mem); -#else - UT_NOT_USED(shm); - - return(NULL); -#endif -} - -/*************************************************************************** -Unmaps a shared memory area from the address space of a process. */ - -ibool -os_shm_unmap( -/*=========*/ - /* out: TRUE if succeed */ - void* addr) /* in: address of the area */ -{ -#ifdef __WIN__ - BOOL ret; - - ut_a(addr); - - ret = UnmapViewOfFile(addr); - - if (ret) { - return(TRUE); - } else { - return(FALSE); - } -#else - UT_NOT_USED(addr); - - return(FALSE); -#endif -} |