Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
ca150507
Commit
ca150507
authored
Apr 21, 2006
by
osku
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add platform-specific os_thread_ret_t and OS_THREAD_DUMMY_RETURN, and
convert thread start functions to use them.
parent
160cd2b2
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
27 additions
and
72 deletions
+27
-72
include/srv0srv.h
include/srv0srv.h
+3
-15
include/trx0roll.h
include/trx0roll.h
+1
-5
include/univ.i
include/univ.i
+12
-0
srv/srv0srv.c
srv/srv0srv.c
+7
-30
srv/srv0start.c
srv/srv0start.c
+2
-10
trx/trx0roll.c
trx/trx0roll.c
+2
-12
No files found.
include/srv0srv.h
View file @
ca150507
...
...
@@ -344,11 +344,7 @@ srv_release_threads(
/*************************************************************************
The master thread controlling the server. */
#ifndef __WIN__
void
*
#else
ulint
#endif
os_thread_ret_t
srv_master_thread
(
/*==============*/
/* out: a dummy parameter */
...
...
@@ -430,11 +426,7 @@ srv_release_mysql_thread_if_suspended(
A thread which wakes up threads whose lock wait may have lasted too long.
This also prints the info output by various InnoDB monitors. */
#ifndef __WIN__
void
*
#else
ulint
#endif
os_thread_ret_t
srv_lock_timeout_and_monitor_thread
(
/*================================*/
/* out: a dummy parameter */
...
...
@@ -444,11 +436,7 @@ srv_lock_timeout_and_monitor_thread(
A thread which prints warnings about semaphore waits which have lasted
too long. These can be used to track bugs which cause hangs. */
#ifndef __WIN__
void
*
#else
ulint
#endif
os_thread_ret_t
srv_error_monitor_thread
(
/*=====================*/
/* out: a dummy parameter */
...
...
include/trx0roll.h
View file @
ca150507
...
...
@@ -107,11 +107,7 @@ transaction already was committed, then we clean up a possible insert
undo log. If the transaction was not yet committed, then we roll it back.
Note: this is done in a background thread. */
#ifndef __WIN__
void
*
#else
ulint
#endif
os_thread_ret_t
trx_rollback_or_clean_all_without_sess
(
/*===================================*/
/* out: a dummy parameter */
...
...
include/univ.i
View file @
ca150507
...
...
@@ -273,6 +273,18 @@ it is read or written. */
/* Compile-time constant of the given array's size. */
#
define
UT_ARR_SIZE
(
a
)
(
sizeof
(
a
)
/
sizeof
((
a
)[
0
]))
/* The return type from a thread's start function differs between Unix and
Windows, so define a typedef for it and a macro to use at the end of such
functions. */
#
ifdef
__WIN__
typedef
ulint
os_thread_ret_t
;
#
define
OS_THREAD_DUMMY_RETURN
return
(
0
)
#
else
typedef
void
*
os_thread_ret_t
;
#
define
OS_THREAD_DUMMY_RETURN
return
(
NULL
)
#
endif
#
include
<
stdio
.
h
>
#
include
"ut0dbg.h"
#
include
"ut0ut.h"
...
...
srv/srv0srv.c
View file @
ca150507
...
...
@@ -1819,11 +1819,7 @@ srv_export_innodb_status(void)
A thread which wakes up threads whose lock wait may have lasted too long.
This also prints the info output by various InnoDB monitors. */
#ifndef __WIN__
void
*
#else
ulint
#endif
os_thread_ret_t
srv_lock_timeout_and_monitor_thread
(
/*================================*/
/* out: a dummy parameter */
...
...
@@ -1995,22 +1991,15 @@ exit_func:
thread should always use that to exit and not use return() to exit. */
os_thread_exit
(
NULL
);
#ifndef __WIN__
return
(
NULL
);
#else
return
(
0
);
#endif
OS_THREAD_DUMMY_RETURN
;
}
/*************************************************************************
A thread which prints warnings about semaphore waits which have lasted
too long. These can be used to track bugs which cause hangs. */
#ifndef __WIN__
void
*
#else
ulint
#endif
os_thread_ret_t
srv_error_monitor_thread
(
/*=====================*/
/* out: a dummy parameter */
...
...
@@ -2092,11 +2081,7 @@ loop:
os_thread_exit
(
NULL
);
#ifndef __WIN__
return
(
NULL
);
#else
return
(
0
);
#endif
OS_THREAD_DUMMY_RETURN
;
}
/***********************************************************************
...
...
@@ -2141,11 +2126,7 @@ srv_wake_master_thread(void)
/*************************************************************************
The master thread controlling the server. */
#ifndef __WIN__
void
*
#else
ulint
#endif
os_thread_ret_t
srv_master_thread
(
/*==============*/
/* out: a dummy parameter */
...
...
@@ -2590,10 +2571,6 @@ suspend_thread:
os_thread_exit
(
NULL
);
#ifndef __WIN__
return
(
NULL
);
/* Not reached */
#else
return
(
0
);
#endif
OS_THREAD_DUMMY_RETURN
;
}
#endif
/* !UNIV_HOTBACKUP */
srv/srv0start.c
View file @
ca150507
...
...
@@ -426,11 +426,7 @@ srv_parse_log_group_home_dirs(
I/o-handler thread function. */
static
#ifndef __WIN__
void
*
#else
ulint
#endif
os_thread_ret_t
io_handler_thread
(
/*==============*/
void
*
arg
)
...
...
@@ -459,11 +455,7 @@ io_handler_thread(
os_thread_exit
(
NULL
);
#ifndef __WIN__
return
(
NULL
);
/* Not reached */
#else
return
(
0
);
#endif
OS_THREAD_DUMMY_RETURN
;
}
#endif
/* !UNIV_HOTBACKUP */
...
...
trx/trx0roll.c
View file @
ca150507
...
...
@@ -391,11 +391,7 @@ transaction already was committed, then we clean up a possible insert
undo log. If the transaction was not yet committed, then we roll it back.
Note: this is done in a background thread. */
#ifndef __WIN__
void
*
#else
ulint
#endif
os_thread_ret_t
trx_rollback_or_clean_all_without_sess
(
/*===================================*/
/* out: a dummy parameter */
...
...
@@ -576,13 +572,7 @@ leave_function:
os_thread_exit
(
NULL
);
/* The following is dummy code to keep the compiler happy: */
#ifndef __WIN__
return
(
NULL
);
#else
return
(
0
);
#endif
OS_THREAD_DUMMY_RETURN
;
}
/***********************************************************************
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment