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
Show 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(
...
@@ -2544,6 +2544,8 @@ i_s_innodb_rseg_fill(
int
status
=
0
;
int
status
=
0
;
trx_rseg_t
*
rseg
;
trx_rseg_t
*
rseg
;
DBUG_ENTER
(
"i_s_innodb_rseg_fill"
);
/* deny access to non-superusers */
/* deny access to non-superusers */
if
(
check_global_access
(
thd
,
PROCESS_ACL
))
{
if
(
check_global_access
(
thd
,
PROCESS_ACL
))
{
...
...
sync/sync0rw.c
View file @
3e5c7d0c
...
@@ -352,6 +352,13 @@ rw_lock_s_lock_spin(
...
@@ -352,6 +352,13 @@ rw_lock_s_lock_spin(
return
;
/* Success */
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
#else
mutex_exit
(
rw_lock_get_mutex
(
lock
));
mutex_exit
(
rw_lock_get_mutex
(
lock
));
#endif
#endif
...
@@ -447,7 +454,7 @@ rw_lock_x_lock_low(
...
@@ -447,7 +454,7 @@ rw_lock_x_lock_low(
switch
(
rw_lock_get_writer
(
lock
))
{
switch
(
rw_lock_get_writer
(
lock
))
{
case
RW_LOCK_WAIT_EX
:
case
RW_LOCK_WAIT_EX
:
/* have right to try x-lock */
/* have right to try x-lock */
if
(
lock
->
lock_word
==
RW_LOCK_BIAS
)
{
retry_x_lock:
/* try x-lock */
/* try x-lock */
if
(
__sync_sub_and_fetch
(
&
(
lock
->
lock_word
),
if
(
__sync_sub_and_fetch
(
&
(
lock
->
lock_word
),
RW_LOCK_BIAS
)
==
0
)
{
RW_LOCK_BIAS
)
==
0
)
{
...
@@ -467,12 +474,12 @@ rw_lock_x_lock_low(
...
@@ -467,12 +474,12 @@ rw_lock_x_lock_low(
/* Locking succeeded, we may return */
/* Locking succeeded, we may return */
return
(
RW_LOCK_EX
);
return
(
RW_LOCK_EX
);
}
else
{
}
else
if
(
__sync_fetch_and_add
(
&
(
lock
->
lock_word
),
/* fail */
RW_LOCK_BIAS
)
==
0
)
{
__sync_fetch_and_add
(
&
(
lock
->
lock_word
),
/* retry x-lock */
RW_LOCK_BIAS
);
goto
retry_x_lock
;
}
}
}
/* There are readers, we have to wait */
/* There are readers, we have to wait */
return
(
RW_LOCK_WAIT_EX
);
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