diff options
author | Sergei Golubchik <sergii@pisem.net> | 2013-12-22 17:06:50 +0100 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2013-12-22 17:06:50 +0100 |
commit | ffa8c4cfcc41d4f160e3bdfca5cfd4b01a7d6e63 (patch) | |
tree | 728585c36f22a5db3cea796430883d0ebc5c05eb /storage/xtradb/include/sync0arr.h | |
parent | e27c34f9e4ca15c797fcd3191ee5679c2f237a09 (diff) | |
parent | 52c26f7a1f675185d2ef1a28aca7f9bcc67c6414 (diff) | |
download | mariadb-git-ffa8c4cfcc41d4f160e3bdfca5cfd4b01a7d6e63.tar.gz |
Percona-Server-5.6.14-rel62.0 merge
support ha_innodb.so as a dynamic plugin.
* remove obsolete *,innodb_plugin.rdiff files
* s/--plugin-load=/--plugin-load-add=/
* MYSQL_PLUGIN_IMPORT glob_hostname[]
* use my_error instead of push_warning_printf(ER_DEFAULT)
* don't use tdc_size and tc_size in a module
update test cases (XtraDB is 5.6.14, InnoDB is 5.6.10)
* copy new tests over
* disable some tests for (old) InnoDB
* delete XtraDB tests that no longer apply
small compatibility changes:
* s/HTON_EXTENDED_KEYS/HTON_SUPPORTS_EXTENDED_KEYS/
* revert unnecessary InnoDB changes to make it a bit closer to the upstream
fix XtraDB to compile on Windows (both as a static and a dynamic plugin)
disable XtraDB on Windows (deadlocks) and where no atomic ops are available (e.g. CentOS 5)
storage/innobase/handler/ha_innodb.cc:
revert few unnecessary changes to make it a bit closer to the original InnoDB
storage/innobase/include/univ.i:
correct the version to match what it was merged from
Diffstat (limited to 'storage/xtradb/include/sync0arr.h')
-rw-r--r-- | storage/xtradb/include/sync0arr.h | 69 |
1 files changed, 31 insertions, 38 deletions
diff --git a/storage/xtradb/include/sync0arr.h b/storage/xtradb/include/sync0arr.h index 4bce9435577..bb4d1037a62 100644 --- a/storage/xtradb/include/sync0arr.h +++ b/storage/xtradb/include/sync0arr.h @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1995, 2009, Innobase Oy. All Rights Reserved. +Copyright (c) 1995, 2009, Oracle and/or its affiliates. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -11,8 +11,8 @@ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with -this program; if not, write to the Free Software Foundation, Inc., -51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +this program; if not, write to the Free Software Foundation, Inc., +51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA *****************************************************************************/ @@ -32,36 +32,10 @@ Created 9/5/1995 Heikki Tuuri #include "os0thread.h" /** Synchronization wait array cell */ -typedef struct sync_cell_struct sync_cell_t; +struct sync_cell_t; /** Synchronization wait array */ -typedef struct sync_array_struct sync_array_t; - -/** Parameters for sync_array_create() @{ */ -#define SYNC_ARRAY_OS_MUTEX 1 /*!< protected by os_mutex_t */ -#define SYNC_ARRAY_MUTEX 2 /*!< protected by mutex_t */ -/* @} */ - -/*******************************************************************//** -Creates a synchronization wait array. It is protected by a mutex -which is automatically reserved when the functions operating on it -are called. -@return own: created wait array */ -UNIV_INTERN -sync_array_t* -sync_array_create( -/*==============*/ - ulint n_cells, /*!< in: number of cells in the array - to create */ - ulint protection); /*!< in: either SYNC_ARRAY_OS_MUTEX or - SYNC_ARRAY_MUTEX: determines the type - of mutex protecting the data structure */ -/******************************************************************//** -Frees the resources in a wait array. */ -UNIV_INTERN -void -sync_array_free( -/*============*/ - sync_array_t* arr); /*!< in, own: sync wait array */ +struct sync_array_t; + /******************************************************************//** Reserves a wait array cell for waiting for an object. The event of the cell is reset to nonsignalled state. */ @@ -99,9 +73,9 @@ sync_array_free_cell( Note that one of the wait objects was signalled. */ UNIV_INTERN void -sync_array_object_signalled( -/*========================*/ - sync_array_t* arr); /*!< in: wait array */ +sync_array_object_signalled(void); +/*=============================*/ + /**********************************************************************//** If the wakeup algorithm does not work perfectly at semaphore relases, this function will do the waking (see the comment in mutex_exit). This @@ -132,11 +106,30 @@ sync_array_validate( Prints info of the wait array. */ UNIV_INTERN void -sync_array_print_info( +sync_array_print( +/*=============*/ + FILE* file); /*!< in: file where to print */ + +/**********************************************************************//** +Create the primary system wait array(s), they are protected by an OS mutex */ +UNIV_INTERN +void +sync_array_init( +/*============*/ + ulint n_threads); /*!< in: Number of slots to create */ +/**********************************************************************//** +Close sync array wait sub-system. */ +UNIV_INTERN +void +sync_array_close(void); /*==================*/ - FILE* file, /*!< in: file where to print */ - sync_array_t* arr); /*!< in: wait array */ +/**********************************************************************//** +Get an instance of the sync wait array. */ +UNIV_INTERN +sync_array_t* +sync_array_get(void); +/*================*/ #ifndef UNIV_NONINL #include "sync0arr.ic" |