summaryrefslogtreecommitdiff
path: root/innobase/os
diff options
context:
space:
mode:
authorunknown <monty@mysql.com>2004-05-20 00:54:52 +0300
committerunknown <monty@mysql.com>2004-05-20 00:54:52 +0300
commit1d9fbbe3ce58dd6ca3793d15f793e2d9cc407133 (patch)
tree969ae655143f6308b50b399e6abcb73c20e39a81 /innobase/os
parent64c5d3110b39800d98b89897f1762c6782c9d50d (diff)
parent32f2ecd4751968104fa5c07f5311683e92632c08 (diff)
downloadmariadb-git-1d9fbbe3ce58dd6ca3793d15f793e2d9cc407133.tar.gz
Merge with 4.0, mainly to get changes to windows project files
VC++Files/client/mysqladmin.dsp: Auto merged VC++Files/client/mysqldump.dsp: Auto merged VC++Files/client/mysqlimport.dsp: Auto merged VC++Files/client/mysqlshow.dsp: Auto merged VC++Files/dbug/dbug.dsp: Auto merged VC++Files/heap/heap.dsp: Auto merged VC++Files/innobase/innobase.dsp: Auto merged VC++Files/isam/isam.dsp: Auto merged VC++Files/isamchk/isamchk.dsp: Auto merged VC++Files/libmysql/libmysql.dsp: Auto merged VC++Files/mysql.dsw: Auto merged BitKeeper/deleted/.del-sync0ipm.ic~2024167f6418de39: Auto merged VC++Files/libmysqltest/myTest.dsp: Auto merged VC++Files/merge/merge.dsp: Auto merged VC++Files/my_print_defaults/my_print_defaults.dsp: Auto merged VC++Files/myisam/myisam.dsp: Auto merged VC++Files/myisam_ftdump/myisam_ftdump.dsp: Auto merged VC++Files/myisammrg/myisammrg.dsp: Auto merged VC++Files/mysqlbinlog/mysqlbinlog.dsp: Auto merged VC++Files/mysqlcheck/mysqlcheck.dsp: Auto merged VC++Files/mysqlshutdown/mysqlshutdown.dsp: Auto merged VC++Files/mysqlwatch/mysqlwatch.dsp: Auto merged VC++Files/mysys/mysys.dsp: Auto merged VC++Files/pack_isam/pack_isam.dsp: Auto merged VC++Files/perror/perror.dsp: Auto merged VC++Files/regex/regex.dsp: Auto merged VC++Files/replace/replace.dsp: Auto merged VC++Files/test1/test1.dsp: Auto merged VC++Files/thr_test/thr_test.dsp: Auto merged VC++Files/vio/vio.dsp: Auto merged VC++Files/zlib/zlib.dsp: Auto merged extra/my_print_defaults.c: Auto merged include/m_string.h: Auto merged include/mysql_embed.h: Auto merged include/mysql_version.h.in: Auto merged innobase/dict/dict0dict.c: Auto merged innobase/mem/mem0pool.c: Auto merged innobase/srv/srv0srv.c: Auto merged innobase/trx/trx0sys.c: Auto merged myisam/myisam_ftdump.c: Auto merged VC++Files/bdb/bdb.dsp: Merge with 4.0 VC++Files/client/mysql.dsp: Merge with 4.0 VC++Files/client/mysqlclient.dsp: Merge with 4.0 VC++Files/comp_err/comp_err.dsp: Merge with 4.0 VC++Files/libmysqld/examples/test_libmysqld.dsp: Merge with 4.0 VC++Files/libmysqld/libmysqld.dsp: Merge with 4.0 VC++Files/myisamchk/myisamchk.dsp: Merge with 4.0 VC++Files/myisamlog/myisamlog.dsp: Merge with 4.0 VC++Files/myisampack/myisampack.dsp: Merge with 4.0 VC++Files/mysqldemb/mysqldemb.dsp: Merge with 4.0 VC++Files/mysqlserver/mysqlserver.dsp: Merge with 4.0 VC++Files/sql/mysqld.dsp: Merge with 4.0 VC++Files/strings/strings.dsp: Merge with 4.0 libmysqld/lib_sql.cc: Merge with 4.0 libmysqld/libmysqld.def: Merge with 4.0 mysql-test/r/func_str.result: Merge with 4.0 mysql-test/r/handler.result: auto mysql-test/r/variables.result: Merge with 4.0 mysql-test/t/func_str.test: auto mysql-test/t/handler.test: auto mysql-test/t/variables.test: Merge with 4.0 scripts/make_win_src_distribution.sh: auto scripts/mysql_install_db.sh: Use original file sql/Makefile.am: Merge with 4.0 sql/ha_innodb.cc: auto sql/item_strfunc.cc: Merge with 4.0 sql/mysql_priv.h: auto sql/mysqld.cc: Merge with 4.0 sql/set_var.cc: Merge with 4.0 sql/slave.cc: auto sql/sql_class.h: auto sql/sql_handler.cc: Merge with 4.0 strings/ctype-tis620.c: Merge with 4.0
Diffstat (limited to 'innobase/os')
-rw-r--r--innobase/os/Makefile.am2
-rw-r--r--innobase/os/makefilewin7
-rw-r--r--innobase/os/os0shm.c152
3 files changed, 3 insertions, 158 deletions
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
-}