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
e6293c49
Commit
e6293c49
authored
Apr 27, 2005
by
msvensson@neptunus.(none)
Browse files
Options
Browse Files
Download
Plain Diff
Merge neptunus.(none):/home/msvensson/mysql/mysql-4.1
into neptunus.(none):/home/msvensson/mysql/mysql-5.0
parents
203cdde9
565e660b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
0 deletions
+20
-0
include/my_pthread.h
include/my_pthread.h
+6
-0
mysys/my_thr_init.c
mysys/my_thr_init.c
+14
-0
No files found.
include/my_pthread.h
View file @
e6293c49
...
@@ -612,6 +612,12 @@ extern pthread_mutexattr_t my_fast_mutexattr;
...
@@ -612,6 +612,12 @@ extern pthread_mutexattr_t my_fast_mutexattr;
#else
#else
#define MY_MUTEX_INIT_FAST NULL
#define MY_MUTEX_INIT_FAST NULL
#endif
#endif
#ifdef PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP
extern
pthread_mutexattr_t
my_errorcheck_mutexattr
;
#define MY_MUTEX_INIT_ERRCHK &my_errorcheck_mutexattr
#else
#define MY_MUTEX_INIT_ERRCHK NULL
#endif
extern
my_bool
my_thread_global_init
(
void
);
extern
my_bool
my_thread_global_init
(
void
);
extern
void
my_thread_global_end
(
void
);
extern
void
my_thread_global_end
(
void
);
...
...
mysys/my_thr_init.c
View file @
e6293c49
...
@@ -40,6 +40,9 @@ pthread_mutex_t LOCK_gethostbyname_r;
...
@@ -40,6 +40,9 @@ pthread_mutex_t LOCK_gethostbyname_r;
#ifdef PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP
#ifdef PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP
pthread_mutexattr_t
my_fast_mutexattr
;
pthread_mutexattr_t
my_fast_mutexattr
;
#endif
#endif
#ifdef PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP
pthread_mutexattr_t
my_errorcheck_mutexattr
;
#endif
/*
/*
initialize thread environment
initialize thread environment
...
@@ -75,6 +78,14 @@ my_bool my_thread_global_init(void)
...
@@ -75,6 +78,14 @@ my_bool my_thread_global_init(void)
pthread_mutexattr_settype
(
&
my_fast_mutexattr
,
pthread_mutexattr_settype
(
&
my_fast_mutexattr
,
PTHREAD_MUTEX_ADAPTIVE_NP
);
PTHREAD_MUTEX_ADAPTIVE_NP
);
#endif
#endif
#ifdef PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP
/*
Set mutex type to "errorcheck" a.k.a "adaptive"
*/
pthread_mutexattr_init
(
&
my_errorcheck_mutexattr
);
pthread_mutexattr_settype
(
&
my_errorcheck_mutexattr
,
PTHREAD_MUTEX_ERRORCHECK
);
#endif
pthread_mutex_init
(
&
THR_LOCK_malloc
,
MY_MUTEX_INIT_FAST
);
pthread_mutex_init
(
&
THR_LOCK_malloc
,
MY_MUTEX_INIT_FAST
);
pthread_mutex_init
(
&
THR_LOCK_open
,
MY_MUTEX_INIT_FAST
);
pthread_mutex_init
(
&
THR_LOCK_open
,
MY_MUTEX_INIT_FAST
);
...
@@ -107,6 +118,9 @@ void my_thread_global_end(void)
...
@@ -107,6 +118,9 @@ void my_thread_global_end(void)
pthread_key_delete
(
THR_KEY_mysys
);
pthread_key_delete
(
THR_KEY_mysys
);
#ifdef PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP
#ifdef PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP
pthread_mutexattr_destroy
(
&
my_fast_mutexattr
);
pthread_mutexattr_destroy
(
&
my_fast_mutexattr
);
#endif
#ifdef PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP
pthread_mutexattr_destroy
(
&
my_errorcheck_mutexattr
);
#endif
#endif
pthread_mutex_destroy
(
&
THR_LOCK_malloc
);
pthread_mutex_destroy
(
&
THR_LOCK_malloc
);
pthread_mutex_destroy
(
&
THR_LOCK_open
);
pthread_mutex_destroy
(
&
THR_LOCK_open
);
...
...
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