summaryrefslogtreecommitdiff
path: root/innobase/sync
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/sync
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/sync')
-rw-r--r--innobase/sync/Makefile.am2
-rw-r--r--innobase/sync/makefilewin7
-rw-r--r--innobase/sync/sync0ipm.c170
3 files changed, 3 insertions, 176 deletions
diff --git a/innobase/sync/Makefile.am b/innobase/sync/Makefile.am
index 4acd4516e35..c95955a733b 100644
--- a/innobase/sync/Makefile.am
+++ b/innobase/sync/Makefile.am
@@ -19,6 +19,6 @@ include ../include/Makefile.i
noinst_LIBRARIES = libsync.a
-libsync_a_SOURCES = sync0arr.c sync0ipm.c sync0rw.c sync0sync.c
+libsync_a_SOURCES = sync0arr.c sync0rw.c sync0sync.c
EXTRA_PROGRAMS =
diff --git a/innobase/sync/makefilewin b/innobase/sync/makefilewin
index 5809d8e7375..73cff40405a 100644
--- a/innobase/sync/makefilewin
+++ b/innobase/sync/makefilewin
@@ -1,7 +1,7 @@
include ..\include\makefile.i
-sync.lib: sync0sync.obj sync0rw.obj sync0ipm.obj sync0arr.obj
- lib -out:..\libs\sync.lib sync0sync.obj sync0rw.obj sync0ipm.obj sync0arr.obj
+sync.lib: sync0sync.obj sync0rw.obj sync0arr.obj
+ lib -out:..\libs\sync.lib sync0sync.obj sync0rw.obj sync0arr.obj
sync0sync.obj: sync0sync.c
$(CCOM) $(CFLN) -c sync0sync.c
@@ -9,9 +9,6 @@ sync0sync.obj: sync0sync.c
sync0rw.obj: sync0rw.c
$(CCOM) $(CFL) -c sync0rw.c
-sync0ipm.obj: sync0ipm.c
- $(CCOM) $(CFL) -c sync0ipm.c
-
sync0arr.obj: sync0arr.c
$(CCOM) $(CFL) -c sync0arr.c
diff --git a/innobase/sync/sync0ipm.c b/innobase/sync/sync0ipm.c
deleted file mode 100644
index e10e1c85da5..00000000000
--- a/innobase/sync/sync0ipm.c
+++ /dev/null
@@ -1,170 +0,0 @@
-/******************************************************
-A fast mutex for interprocess synchronization.
-mutex_t can be used only within single process,
-but ip_mutex_t also between processes.
-
-(c) 1995 Innobase Oy
-
-Created 9/30/1995 Heikki Tuuri
-*******************************************************/
-#include "sync0ipm.h"
-#ifdef UNIV_NONINL
-#include "sync0ipm.ic"
-#endif
-
-#include "mem0mem.h"
-
-/* The performance of the ip mutex in NT depends on how often
-a thread has to suspend itself waiting for the ip mutex
-to become free. The following variable counts system calls
-involved. */
-
-ulint ip_mutex_system_call_count = 0;
-
-/**********************************************************************
-Creates, or rather, initializes
-an ip mutex object in a specified shared memory location (which must be
-appropriately aligned). The ip mutex is initialized in the reset state.
-NOTE! Explicit destroying of the ip mutex with ip_mutex_free
-is not recommended
-as the mutex resides in shared memory and we cannot make sure that
-no process is currently accessing it. Therefore just use
-ip_mutex_close to free the operating system event and mutex. */
-
-ulint
-ip_mutex_create(
-/*============*/
- /* out: 0 if succeed */
- ip_mutex_t* ip_mutex, /* in: pointer to shared memory */
- char* name, /* in: name of the ip mutex */
- ip_mutex_hdl_t** handle) /* out, own: handle to the
- created mutex; handle exists
- in the private address space of
- the calling process */
-{
- mutex_t* mutex;
- char* buf;
- os_event_t released;
- os_mutex_t exclude;
-
- ip_mutex_set_waiters(ip_mutex, 0);
-
- buf = mem_alloc(strlen(name) + 20);
-
- strcpy(buf, name);
- strcpy(buf + strlen(name), "_IB_RELS");
-
- released = os_event_create(buf);
-
- if (released == NULL) {
- mem_free(buf);
- return(1);
- }
-
- strcpy(buf + strlen(name), "_IB_EXCL");
-
- exclude = os_mutex_create(buf);
-
- if (exclude == NULL) {
- os_event_free(released);
- mem_free(buf);
- return(1);
- }
-
- mutex = ip_mutex_get_mutex(ip_mutex);
-
- mutex_create(mutex);
- mutex_set_level(mutex, SYNC_NO_ORDER_CHECK);
-
- *handle = mem_alloc(sizeof(ip_mutex_hdl_t));
-
- (*handle)->ip_mutex = ip_mutex;
- (*handle)->released = released;
- (*handle)->exclude = exclude;
-
- mem_free(buf);
-
- return(0);
-}
-
-/**********************************************************************
-NOTE! Using this function is not recommended. See the note
-on ip_mutex_create. Destroys an ip mutex */
-
-void
-ip_mutex_free(
-/*==========*/
- ip_mutex_hdl_t* handle) /* in, own: ip mutex handle */
-{
- mutex_free(ip_mutex_get_mutex(handle->ip_mutex));
-
- os_event_free(handle->released);
- os_mutex_free(handle->exclude);
-
- mem_free(handle);
-}
-
-/**********************************************************************
-Opens an ip mutex object in a specified shared memory location.
-Explicit closing of the ip mutex with ip_mutex_close is necessary to
-free the operating system event and mutex created, and the handle. */
-
-ulint
-ip_mutex_open(
-/*==========*/
- /* out: 0 if succeed */
- ip_mutex_t* ip_mutex, /* in: pointer to shared memory */
- char* name, /* in: name of the ip mutex */
- ip_mutex_hdl_t** handle) /* out, own: handle to the
- opened mutex */
-{
- char* buf;
- os_event_t released;
- os_mutex_t exclude;
-
- buf = mem_alloc(strlen(name) + 20);
-
- strcpy(buf, name);
- strcpy(buf + strlen(name), "_IB_RELS");
-
- released = os_event_create(buf);
-
- if (released == NULL) {
- mem_free(buf);
- return(1);
- }
-
- strcpy(buf + strlen(name), "_IB_EXCL");
-
- exclude = os_mutex_create(buf);
-
- if (exclude == NULL) {
- os_event_free(released);
- mem_free(buf);
- return(1);
- }
-
- *handle = mem_alloc(sizeof(ip_mutex_hdl_t));
-
- (*handle)->ip_mutex = ip_mutex;
- (*handle)->released = released;
- (*handle)->exclude = exclude;
-
- mem_free(buf);
-
- return(0);
-}
-
-/**********************************************************************
-Closes an ip mutex. */
-
-void
-ip_mutex_close(
-/*===========*/
- ip_mutex_hdl_t* handle) /* in, own: ip mutex handle */
-{
- os_event_free(handle->released);
- os_mutex_free(handle->exclude);
-
- mem_free(handle);
-}