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
3e5c7d0c
Commit
3e5c7d0c
authored
Feb 10, 2009
by
Vadim Tkachenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sync with rev43
parent
4ba507ef
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
20 deletions
+29
-20
handler/i_s.cc
handler/i_s.cc
+2
-0
sync/sync0rw.c
sync/sync0rw.c
+27
-20
No files found.
handler/i_s.cc
View file @
3e5c7d0c
...
...
@@ -2544,6 +2544,8 @@ i_s_innodb_rseg_fill(
int
status
=
0
;
trx_rseg_t
*
rseg
;
DBUG_ENTER
(
"i_s_innodb_rseg_fill"
);
/* deny access to non-superusers */
if
(
check_global_access
(
thd
,
PROCESS_ACL
))
{
...
...
sync/sync0rw.c
View file @
3e5c7d0c
...
...
@@ -352,6 +352,13 @@ rw_lock_s_lock_spin(
return
;
/* Success */
}
}
/* If wait_ex_waiter stalls, wakes it. */
if
(
lock
->
wait_ex_waiters
&&
lock
->
lock_word
==
RW_LOCK_BIAS
)
{
rw_lock_set_wx_waiters
(
lock
,
0
);
os_event_set
(
lock
->
wait_ex_event
);
sync_array_object_signalled
(
sync_primary_wait_array
);
}
#else
mutex_exit
(
rw_lock_get_mutex
(
lock
));
#endif
...
...
@@ -447,32 +454,32 @@ rw_lock_x_lock_low(
switch
(
rw_lock_get_writer
(
lock
))
{
case
RW_LOCK_WAIT_EX
:
/* have right to try x-lock */
if
(
lock
->
lock_word
==
RW_LOCK_BIAS
)
{
/* try x-lock */
if
(
__sync_sub_and_fetch
(
&
(
lock
->
lock_word
),
RW_LOCK_BIAS
)
==
0
)
{
/* success */
lock
->
pass
=
pass
;
lock
->
writer_is_wait_ex
=
FALSE
;
__sync_fetch_and_add
(
&
(
lock
->
writer_count
),
1
);
retry_x_lock:
/* try x-lock */
if
(
__sync_sub_and_fetch
(
&
(
lock
->
lock_word
),
RW_LOCK_BIAS
)
==
0
)
{
/* success */
lock
->
pass
=
pass
;
lock
->
writer_is_wait_ex
=
FALSE
;
__sync_fetch_and_add
(
&
(
lock
->
writer_count
),
1
);
#ifdef UNIV_SYNC_DEBUG
rw_lock_remove_debug_info
(
lock
,
pass
,
RW_LOCK_WAIT_EX
);
rw_lock_add_debug_info
(
lock
,
pass
,
RW_LOCK_EX
,
file_name
,
line
);
rw_lock_remove_debug_info
(
lock
,
pass
,
RW_LOCK_WAIT_EX
);
rw_lock_add_debug_info
(
lock
,
pass
,
RW_LOCK_EX
,
file_name
,
line
);
#endif
lock
->
last_x_file_name
=
file_name
;
lock
->
last_x_line
=
line
;
lock
->
last_x_file_name
=
file_name
;
lock
->
last_x_line
=
line
;
/* Locking succeeded, we may return */
return
(
RW_LOCK_EX
);
}
else
{
/* fail */
__sync_fetch_and_add
(
&
(
lock
->
lock_word
),
RW_LOCK_BIAS
);
}
/* Locking succeeded, we may return */
return
(
RW_LOCK_EX
);
}
else
if
(
__sync_fetch_and_add
(
&
(
lock
->
lock_word
),
RW_LOCK_BIAS
)
==
0
)
{
/* retry x-lock */
goto
retry_x_lock
;
}
/* There are readers, we have to wait */
return
(
RW_LOCK_WAIT_EX
);
...
...
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