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
cde525f9
Commit
cde525f9
authored
Nov 30, 2020
by
Marko Mäkelä
Browse files
Options
Browse Files
Download
Plain Diff
Merge 10.5 into 10.6
parents
fc6a7e90
e34e53b5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
3 deletions
+15
-3
storage/innobase/include/os0thread.h
storage/innobase/include/os0thread.h
+9
-3
storage/innobase/os/os0thread.cc
storage/innobase/os/os0thread.cc
+6
-0
No files found.
storage/innobase/include/os0thread.h
View file @
cde525f9
...
...
@@ -66,9 +66,15 @@ typedef void* (*os_posix_f_t) (void*);
typedef
unsigned
int
mysql_pfs_key_t
;
#endif
/* HAVE_PSI_INTERFACE */
#define os_thread_eq(a,b) IF_WIN(a == b, pthread_equal(a, b))
#define os_thread_yield() IF_WIN(SwitchToThread(), sched_yield())
#define os_thread_get_curr_id() IF_WIN(GetCurrentThreadId(), pthread_self())
#ifndef _WIN32
#define os_thread_eq(a,b) pthread_equal(a, b)
#define os_thread_yield() sched_yield()
#define os_thread_get_curr_id() pthread_self()
#else
bool
os_thread_eq
(
os_thread_id_t
a
,
os_thread_id_t
b
);
void
os_thread_yield
();
os_thread_id_t
os_thread_get_curr_id
();
#endif
/****************************************************************//**
Creates a new thread of execution. The execution starts from
...
...
storage/innobase/os/os0thread.cc
View file @
cde525f9
...
...
@@ -27,6 +27,12 @@ Created 9/8/1995 Heikki Tuuri
#include "univ.i"
#include "srv0srv.h"
#ifdef _WIN32
bool
os_thread_eq
(
os_thread_id_t
a
,
os_thread_id_t
b
)
{
return
a
==
b
;
}
void
os_thread_yield
()
{
SwitchToThread
();
}
os_thread_id_t
os_thread_get_curr_id
()
{
return
GetCurrentThreadId
();
}
#endif
/****************************************************************//**
Creates a new thread of execution. The execution starts from
the function given.
...
...
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