summaryrefslogtreecommitdiff
path: root/storage/innodb_plugin/ut
diff options
context:
space:
mode:
authorSergey Vojtovich <svoj@sun.com>2009-07-30 17:42:56 +0500
committerSergey Vojtovich <svoj@sun.com>2009-07-30 17:42:56 +0500
commitbae6276d458cdbf68df5d472ed63d4d7e3b09e66 (patch)
tree4d4fd1ed09a36796ae4f3f23fc3daa5f4bf7947f /storage/innodb_plugin/ut
parent058cd6256557165d4b8a059c071eaea91d39d2b7 (diff)
downloadmariadb-git-bae6276d458cdbf68df5d472ed63d4d7e3b09e66.tar.gz
Update to innoplug-1.0.4.
Diffstat (limited to 'storage/innodb_plugin/ut')
-rw-r--r--storage/innodb_plugin/ut/ut0auxconf_pause.c32
-rw-r--r--storage/innodb_plugin/ut/ut0mem.c2
-rw-r--r--storage/innodb_plugin/ut/ut0ut.c8
3 files changed, 41 insertions, 1 deletions
diff --git a/storage/innodb_plugin/ut/ut0auxconf_pause.c b/storage/innodb_plugin/ut/ut0auxconf_pause.c
new file mode 100644
index 00000000000..54d63bdd9bc
--- /dev/null
+++ b/storage/innodb_plugin/ut/ut0auxconf_pause.c
@@ -0,0 +1,32 @@
+/*****************************************************************************
+
+Copyright (c) 2009, Innobase Oy. 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
+Foundation; version 2 of the License.
+
+This program is distributed in the hope that it will be useful, but WITHOUT
+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., 59 Temple
+Place, Suite 330, Boston, MA 02111-1307 USA
+
+*****************************************************************************/
+
+/*****************************************************************************
+If this program compiles and can be run and returns 0, then the pause
+instruction is available.
+
+Created Jul 21, 2009 Vasil Dimov
+*****************************************************************************/
+
+int
+main(int argc, char** argv)
+{
+ __asm__ __volatile__ ("pause");
+
+ return(0);
+}
diff --git a/storage/innodb_plugin/ut/ut0mem.c b/storage/innodb_plugin/ut/ut0mem.c
index 7ed43d32fe0..edb63c95700 100644
--- a/storage/innodb_plugin/ut/ut0mem.c
+++ b/storage/innodb_plugin/ut/ut0mem.c
@@ -333,7 +333,7 @@ man realloc in Linux, 2004:
realloc() changes the size of the memory block pointed to
by ptr to size bytes. The contents will be unchanged to
- the minimum of the old and new sizes; newly allocated mem­
+ the minimum of the old and new sizes; newly allocated mem-
ory will be uninitialized. If ptr is NULL, the call is
equivalent to malloc(size); if size is equal to zero, the
call is equivalent to free(ptr). Unless ptr is NULL, it
diff --git a/storage/innodb_plugin/ut/ut0ut.c b/storage/innodb_plugin/ut/ut0ut.c
index c0ea362bee3..e4cc226fbad 100644
--- a/storage/innodb_plugin/ut/ut0ut.c
+++ b/storage/innodb_plugin/ut/ut0ut.c
@@ -1,6 +1,13 @@
/*****************************************************************************
Copyright (c) 1994, 2009, Innobase Oy. All Rights Reserved.
+Copyright (c) 2009, Sun Microsystems, Inc.
+
+Portions of this file contain modifications contributed and copyrighted by
+Sun Microsystems, Inc. Those modifications are gratefully acknowledged and
+are described briefly in the InnoDB documentation. The contributions by
+Sun Microsystems are incorporated with their permission, and subject to the
+conditions contained in the file COPYING.Sun_Microsystems.
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
@@ -391,6 +398,7 @@ ut_delay(
for (i = 0; i < delay * 50; i++) {
j += i;
+ UT_RELAX_CPU();
}
if (ut_always_false) {