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
b5e96531
Commit
b5e96531
authored
Apr 27, 2005
by
msvensson@neptunus.(none)
Browse files
Options
Browse Files
Download
Plain Diff
Merge neptunus.(none):/home/msvensson/mysql/bug9954
into neptunus.(none):/home/msvensson/mysql/mysql-4.1
parents
631f035e
f3c72cc8
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
29 deletions
+20
-29
cmd-line-utils/libedit/makelist.sh
cmd-line-utils/libedit/makelist.sh
+4
-3
configure.in
configure.in
+1
-1
include/my_pthread.h
include/my_pthread.h
+3
-9
mysys/my_thr_init.c
mysys/my_thr_init.c
+12
-16
No files found.
cmd-line-utils/libedit/makelist.sh
View file @
b5e96531
...
@@ -68,7 +68,7 @@ case $FLAG in
...
@@ -68,7 +68,7 @@ case $FLAG in
/\(\):/ {
/\(\):/ {
pr = substr($2, 1, 2);
pr = substr($2, 1, 2);
if (pr == "vi" || pr == "em" || pr == "ed") {
if (pr == "vi" || pr == "em" || pr == "ed") {
name = substr($2, 1,
length($2) - 3
);
name = substr($2, 1,
index($2,"(") - 1
);
#
#
# XXX: need a space between name and prototype so that -fc and -fh
# XXX: need a space between name and prototype so that -fc and -fh
# parsing is much easier
# parsing is much easier
...
@@ -97,7 +97,7 @@ case $FLAG in
...
@@ -97,7 +97,7 @@ case $FLAG in
/\(\):/ {
/\(\):/ {
pr = substr($2, 1, 2);
pr = substr($2, 1, 2);
if (pr == "vi" || pr == "em" || pr == "ed") {
if (pr == "vi" || pr == "em" || pr == "ed") {
name = substr($2, 1,
length($2) - 3
);
name = substr($2, 1,
index($2,"(") - 1
);
uname = "";
uname = "";
fname = "";
fname = "";
for (i = 1; i <= length(name); i++) {
for (i = 1; i <= length(name); i++) {
...
@@ -117,6 +117,7 @@ case $FLAG in
...
@@ -117,6 +117,7 @@ case $FLAG in
printf(" \"");
printf(" \"");
for (i = 2; i < NF; i++)
for (i = 2; i < NF; i++)
printf("%s ", $i);
printf("%s ", $i);
sub("\r", "", $i);
printf("%s\" },\n", $i);
printf("%s\" },\n", $i);
ok = 0;
ok = 0;
}
}
...
@@ -219,7 +220,7 @@ case $FLAG in
...
@@ -219,7 +220,7 @@ case $FLAG in
/\(\):/ {
/\(\):/ {
pr = substr($2, 1, 2);
pr = substr($2, 1, 2);
if (pr == "vi" || pr == "em" || pr == "ed") {
if (pr == "vi" || pr == "em" || pr == "ed") {
name = substr($2, 1,
length($2) - 3
);
name = substr($2, 1,
index($2, "(") - 1
);
fname = "";
fname = "";
for (i = 1; i <= length(name); i++) {
for (i = 1; i <= length(name); i++) {
s = substr(name, i, 1);
s = substr(name, i, 1);
...
...
configure.in
View file @
b5e96531
...
@@ -118,7 +118,7 @@ AC_SUBST(SAVE_LDFLAGS)
...
@@ -118,7 +118,7 @@ AC_SUBST(SAVE_LDFLAGS)
AC_SUBST
(
SAVE_CXXLDFLAGS
)
AC_SUBST
(
SAVE_CXXLDFLAGS
)
AC_SUBST
(
CXXLDFLAGS
)
AC_SUBST
(
CXXLDFLAGS
)
AC_PREREQ
(
2.
12
)
dnl Minimum Autoconf version required.
AC_PREREQ
(
2.
58
)
dnl Minimum Autoconf version required.
#AC_ARG_PROGRAM # Automaticly invoked by AM_INIT_AUTOMAKE
#AC_ARG_PROGRAM # Automaticly invoked by AM_INIT_AUTOMAKE
AM_SANITY_CHECK
AM_SANITY_CHECK
...
...
include/my_pthread.h
View file @
b5e96531
...
@@ -604,19 +604,13 @@ extern int my_rw_trywrlock(my_rw_lock_t *);
...
@@ -604,19 +604,13 @@ extern int my_rw_trywrlock(my_rw_lock_t *);
#define pthread_attr_setstacksize(A,B) pthread_dummy(0)
#define pthread_attr_setstacksize(A,B) pthread_dummy(0)
#endif
#endif
/* Define mutex types */
/* Define mutex types
, see my_thr_init.c
*/
#define MY_MUTEX_INIT_SLOW NULL
#define MY_MUTEX_INIT_SLOW NULL
#define MY_MUTEX_INIT_FAST NULL
#define MY_MUTEX_INIT_ERRCHK NULL
#ifdef PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP
#ifdef PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP
extern
pthread_mutexattr_t
my_fast_mutexattr
;
extern
pthread_mutexattr_t
my_fast_mutexattr
;
#undef MY_MUTEX_INIT_FAST
#define MY_MUTEX_INIT_FAST &my_fast_mutexattr
#define MY_MUTEX_INIT_FAST &my_fast_mutexattr
#endif
#else
#ifdef PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP
#define MY_MUTEX_INIT_FAST NULL
extern
pthread_mutexattr_t
my_errchk_mutexattr
;
#undef MY_INIT_MUTEX_ERRCHK
#define MY_INIT_MUTEX_ERRCHK &my_errchk_mutexattr
#endif
#endif
extern
my_bool
my_thread_global_init
(
void
);
extern
my_bool
my_thread_global_init
(
void
);
...
...
mysys/my_thr_init.c
View file @
b5e96531
...
@@ -40,9 +40,6 @@ pthread_mutex_t LOCK_gethostbyname_r;
...
@@ -40,9 +40,6 @@ 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_errchk_mutexattr
;
#endif
/*
/*
initialize thread environment
initialize thread environment
...
@@ -62,19 +59,21 @@ my_bool my_thread_global_init(void)
...
@@ -62,19 +59,21 @@ my_bool my_thread_global_init(void)
fprintf
(
stderr
,
"Can't initialize threads: error %d
\n
"
,
errno
);
fprintf
(
stderr
,
"Can't initialize threads: error %d
\n
"
,
errno
);
return
1
;
return
1
;
}
}
#ifdef PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP
#ifdef PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP
pthread_mutexattr_init
(
&
my_fast_mutexattr
);
/*
/*
Note that the following statement may give a compiler warning under
Set mutex type to "fast" a.k.a "adaptive"
some configurations, but there isn't anything we can do about this as
this is a bug in the header files for the thread implementation
The mutex kind determines what happens if a thread attempts to lock
a mutex it already owns with pthread_mutex_lock(3). If the mutex
is of the ``fast'' kind, pthread_mutex_lock(3) simply suspends
the calling thread forever. If the mutex is of the ``error checking''
kind, pthread_mutex_lock(3) returns immediately with the error
code EDEADLK.
*/
*/
pthread_mutexattr_setkind_np
(
&
my_fast_mutexattr
,
PTHREAD_MUTEX_ADAPTIVE_NP
);
pthread_mutexattr_init
(
&
my_fast_mutexattr
);
#endif
pthread_mutexattr_settype
(
&
my_fast_mutexattr
,
#ifdef PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP
PTHREAD_MUTEX_ADAPTIVE_NP
);
pthread_mutexattr_init
(
&
my_errchk_mutexattr
);
pthread_mutexattr_setkind_np
(
&
my_errchk_mutexattr
,
PTHREAD_MUTEX_ERRORCHECK_NP
);
#endif
#endif
pthread_mutex_init
(
&
THR_LOCK_malloc
,
MY_MUTEX_INIT_FAST
);
pthread_mutex_init
(
&
THR_LOCK_malloc
,
MY_MUTEX_INIT_FAST
);
...
@@ -108,9 +107,6 @@ void my_thread_global_end(void)
...
@@ -108,9 +107,6 @@ 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_errchk_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