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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
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(
...
@@ -344,11 +344,7 @@ srv_release_threads(
/*************************************************************************
/*************************************************************************
The master thread controlling the server. */
The master thread controlling the server. */
#ifndef __WIN__
os_thread_ret_t
void
*
#else
ulint
#endif
srv_master_thread
(
srv_master_thread
(
/*==============*/
/*==============*/
/* out: a dummy parameter */
/* out: a dummy parameter */
...
@@ -430,11 +426,7 @@ srv_release_mysql_thread_if_suspended(
...
@@ -430,11 +426,7 @@ srv_release_mysql_thread_if_suspended(
A thread which wakes up threads whose lock wait may have lasted too long.
A thread which wakes up threads whose lock wait may have lasted too long.
This also prints the info output by various InnoDB monitors. */
This also prints the info output by various InnoDB monitors. */
#ifndef __WIN__
os_thread_ret_t
void
*
#else
ulint
#endif
srv_lock_timeout_and_monitor_thread
(
srv_lock_timeout_and_monitor_thread
(
/*================================*/
/*================================*/
/* out: a dummy parameter */
/* out: a dummy parameter */
...
@@ -444,11 +436,7 @@ srv_lock_timeout_and_monitor_thread(
...
@@ -444,11 +436,7 @@ srv_lock_timeout_and_monitor_thread(
A thread which prints warnings about semaphore waits which have lasted
A thread which prints warnings about semaphore waits which have lasted
too long. These can be used to track bugs which cause hangs. */
too long. These can be used to track bugs which cause hangs. */
#ifndef __WIN__
os_thread_ret_t
void
*
#else
ulint
#endif
srv_error_monitor_thread
(
srv_error_monitor_thread
(
/*=====================*/
/*=====================*/
/* out: a dummy parameter */
/* 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
...
@@ -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.
undo log. If the transaction was not yet committed, then we roll it back.
Note: this is done in a background thread. */
Note: this is done in a background thread. */
#ifndef __WIN__
os_thread_ret_t
void
*
#else
ulint
#endif
trx_rollback_or_clean_all_without_sess
(
trx_rollback_or_clean_all_without_sess
(
/*===================================*/
/*===================================*/
/* out: a dummy parameter */
/* out: a dummy parameter */
...
...
include/univ.i
View file @
ca150507
...
@@ -273,6 +273,18 @@ it is read or written. */
...
@@ -273,6 +273,18 @@ it is read or written. */
/* Compile-time constant of the given array's size. */
/* Compile-time constant of the given array's size. */
#
define
UT_ARR_SIZE
(
a
)
(
sizeof
(
a
)
/
sizeof
((
a
)[
0
]))
#
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
<
stdio
.
h
>
#
include
"ut0dbg.h"
#
include
"ut0dbg.h"
#
include
"ut0ut.h"
#
include
"ut0ut.h"
...
...
srv/srv0srv.c
View file @
ca150507
...
@@ -1819,11 +1819,7 @@ srv_export_innodb_status(void)
...
@@ -1819,11 +1819,7 @@ srv_export_innodb_status(void)
A thread which wakes up threads whose lock wait may have lasted too long.
A thread which wakes up threads whose lock wait may have lasted too long.
This also prints the info output by various InnoDB monitors. */
This also prints the info output by various InnoDB monitors. */
#ifndef __WIN__
os_thread_ret_t
void
*
#else
ulint
#endif
srv_lock_timeout_and_monitor_thread
(
srv_lock_timeout_and_monitor_thread
(
/*================================*/
/*================================*/
/* out: a dummy parameter */
/* out: a dummy parameter */
...
@@ -1995,22 +1991,15 @@ srv_lock_timeout_and_monitor_thread(
...
@@ -1995,22 +1991,15 @@ srv_lock_timeout_and_monitor_thread(
thread should always use that to exit and not use return() to exit. */
thread should always use that to exit and not use return() to exit. */
os_thread_exit
(
NULL
);
os_thread_exit
(
NULL
);
#ifndef __WIN__
return
(
NULL
);
OS_THREAD_DUMMY_RETURN
;
#else
return
(
0
);
#endif
}
}
/*************************************************************************
/*************************************************************************
A thread which prints warnings about semaphore waits which have lasted
A thread which prints warnings about semaphore waits which have lasted
too long. These can be used to track bugs which cause hangs. */
too long. These can be used to track bugs which cause hangs. */
#ifndef __WIN__
os_thread_ret_t
void
*
#else
ulint
#endif
srv_error_monitor_thread
(
srv_error_monitor_thread
(
/*=====================*/
/*=====================*/
/* out: a dummy parameter */
/* out: a dummy parameter */
...
@@ -2092,11 +2081,7 @@ srv_error_monitor_thread(
...
@@ -2092,11 +2081,7 @@ srv_error_monitor_thread(
os_thread_exit
(
NULL
);
os_thread_exit
(
NULL
);
#ifndef __WIN__
OS_THREAD_DUMMY_RETURN
;
return
(
NULL
);
#else
return
(
0
);
#endif
}
}
/***********************************************************************
/***********************************************************************
...
@@ -2141,11 +2126,7 @@ srv_wake_master_thread(void)
...
@@ -2141,11 +2126,7 @@ srv_wake_master_thread(void)
/*************************************************************************
/*************************************************************************
The master thread controlling the server. */
The master thread controlling the server. */
#ifndef __WIN__
os_thread_ret_t
void
*
#else
ulint
#endif
srv_master_thread
(
srv_master_thread
(
/*==============*/
/*==============*/
/* out: a dummy parameter */
/* out: a dummy parameter */
...
@@ -2590,10 +2571,6 @@ srv_master_thread(
...
@@ -2590,10 +2571,6 @@ srv_master_thread(
os_thread_exit
(
NULL
);
os_thread_exit
(
NULL
);
#ifndef __WIN__
OS_THREAD_DUMMY_RETURN
;
return
(
NULL
);
/* Not reached */
#else
return
(
0
);
#endif
}
}
#endif
/* !UNIV_HOTBACKUP */
#endif
/* !UNIV_HOTBACKUP */
srv/srv0start.c
View file @
ca150507
...
@@ -426,11 +426,7 @@ srv_parse_log_group_home_dirs(
...
@@ -426,11 +426,7 @@ srv_parse_log_group_home_dirs(
I/o-handler thread function. */
I/o-handler thread function. */
static
static
#ifndef __WIN__
os_thread_ret_t
void
*
#else
ulint
#endif
io_handler_thread
(
io_handler_thread
(
/*==============*/
/*==============*/
void
*
arg
)
void
*
arg
)
...
@@ -459,11 +455,7 @@ io_handler_thread(
...
@@ -459,11 +455,7 @@ io_handler_thread(
os_thread_exit
(
NULL
);
os_thread_exit
(
NULL
);
#ifndef __WIN__
OS_THREAD_DUMMY_RETURN
;
return
(
NULL
);
/* Not reached */
#else
return
(
0
);
#endif
}
}
#endif
/* !UNIV_HOTBACKUP */
#endif
/* !UNIV_HOTBACKUP */
...
...
trx/trx0roll.c
View file @
ca150507
...
@@ -391,11 +391,7 @@ transaction already was committed, then we clean up a possible insert
...
@@ -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.
undo log. If the transaction was not yet committed, then we roll it back.
Note: this is done in a background thread. */
Note: this is done in a background thread. */
#ifndef __WIN__
os_thread_ret_t
void
*
#else
ulint
#endif
trx_rollback_or_clean_all_without_sess
(
trx_rollback_or_clean_all_without_sess
(
/*===================================*/
/*===================================*/
/* out: a dummy parameter */
/* out: a dummy parameter */
...
@@ -576,13 +572,7 @@ trx_rollback_or_clean_all_without_sess(
...
@@ -576,13 +572,7 @@ trx_rollback_or_clean_all_without_sess(
os_thread_exit
(
NULL
);
os_thread_exit
(
NULL
);
/* The following is dummy code to keep the compiler happy: */
OS_THREAD_DUMMY_RETURN
;
#ifndef __WIN__
return
(
NULL
);
#else
return
(
0
);
#endif
}
}
/***********************************************************************
/***********************************************************************
...
...
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