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
96fff96c
Commit
96fff96c
authored
Aug 31, 2008
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixes for windows
parent
c9e78d14
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
8 deletions
+8
-8
include/my_pthread.h
include/my_pthread.h
+1
-1
include/waiting_threads.h
include/waiting_threads.h
+1
-1
mysys/CMakeLists.txt
mysys/CMakeLists.txt
+1
-1
mysys/waiting_threads.c
mysys/waiting_threads.c
+5
-5
No files found.
include/my_pthread.h
View file @
96fff96c
...
...
@@ -98,7 +98,7 @@ struct timespec {
#define set_timespec_nsec(ABSTIME,NSEC) do { \
union ft64 tv; \
GetSystemTimeAsFileTime(&tv.ft); \
set_timespec_time_nsec((ABSTIME), tv.i64, (NSEC))
\
set_timespec_time_nsec((ABSTIME), tv.i64, (NSEC))
;
\
} while(0)
void
win_pthread_init
(
void
);
...
...
include/waiting_threads.h
View file @
96fff96c
...
...
@@ -80,7 +80,7 @@ typedef struct st_wt_resource {
in the sense that lf_hash_insert() won't memcpy() over them.
See wt_init().
*/
pthread_rw
lock_t
lock
;
rw_
lock_t
lock
;
pthread_cond_t
cond
;
DYNAMIC_ARRAY
owners
;
}
WT_RESOURCE
;
...
...
mysys/CMakeLists.txt
View file @
96fff96c
...
...
@@ -44,7 +44,7 @@ SET(MYSYS_SOURCES array.c charset-def.c charset.c checksum.c default.c default_
thr_rwlock.c tree.c typelib.c my_vle.c base64.c my_memmem.c my_getpagesize.c
lf_alloc-pin.c lf_dynarray.c lf_hash.c
my_atomic.c my_getncpus.c my_rnd.c
my_uuid.c wqueue.c
my_uuid.c wqueue.c
waiting_threads.c
)
IF
(
NOT SOURCE_SUBLIBS
)
...
...
mysys/waiting_threads.c
View file @
96fff96c
...
...
@@ -170,19 +170,19 @@ static my_atomic_rwlock_t cycle_stats_lock, wait_stats_lock, success_stats_lock;
do { \
WT_RESOURCE *R=(X); \
DBUG_PRINT("wt", ("LOCK resid=%lld for READ", R->id.value.num)); \
pthread_rwlock
_rdlock(&R->lock); \
rw
_rdlock(&R->lock); \
} while (0)
#define rc_wrlock(X) \
do { \
WT_RESOURCE *R=(X); \
DBUG_PRINT("wt", ("LOCK resid=%lld for WRITE", R->id.value.num)); \
pthread_rwlock
_wrlock(&R->lock); \
rw
_wrlock(&R->lock); \
} while (0)
#define rc_unlock(X) \
do { \
WT_RESOURCE *R=(X); \
DBUG_PRINT("wt", ("UNLOCK resid=%lld", R->id.value.num)); \
pthread_rwlock
_unlock(&R->lock); \
rw
_unlock(&R->lock); \
} while (0)
/*
...
...
@@ -203,7 +203,7 @@ static void wt_resource_init(uchar *arg)
DBUG_ENTER
(
"wt_resource_init"
);
bzero
(
rc
,
sizeof
(
*
rc
));
pthread
_rwlock_init
(
&
rc
->
lock
,
0
);
my
_rwlock_init
(
&
rc
->
lock
,
0
);
pthread_cond_init
(
&
rc
->
cond
,
0
);
my_init_dynamic_array
(
&
rc
->
owners
,
sizeof
(
WT_THD
*
),
0
,
5
);
DBUG_VOID_RETURN
;
...
...
@@ -221,7 +221,7 @@ static void wt_resource_destroy(uchar *arg)
DBUG_ENTER
(
"wt_resource_destroy"
);
DBUG_ASSERT
(
rc
->
owners
.
elements
==
0
);
pthread_
rwlock_destroy
(
&
rc
->
lock
);
rwlock_destroy
(
&
rc
->
lock
);
pthread_cond_destroy
(
&
rc
->
cond
);
delete_dynamic
(
&
rc
->
owners
);
DBUG_VOID_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