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
aafdd9ab
Commit
aafdd9ab
authored
Oct 01, 2007
by
marko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
branches/zip: Introduce the function buf_block_fix_dec(), similar to
buf_block_fix_inc(), and use it.
parent
331af5c5
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
25 deletions
+20
-25
buf/buf0buf.c
buf/buf0buf.c
+4
-25
include/buf0buf.ic
include/buf0buf.ic
+16
-0
No files found.
buf/buf0buf.c
View file @
aafdd9ab
...
...
@@ -1937,13 +1937,8 @@ buf_page_get_gen(
if
(
!
success
)
{
mutex_enter
(
&
block
->
mutex
);
block
->
page
.
buf_fix_count
--
;
buf_block_buf_fix_dec
(
block
);
mutex_exit
(
&
block
->
mutex
);
#ifdef UNIV_SYNC_DEBUG
rw_lock_s_unlock
(
&
(
block
->
debug_latch
));
#endif
return
(
NULL
);
}
...
...
@@ -2056,14 +2051,9 @@ buf_page_optimistic_get_func(
if
(
UNIV_UNLIKELY
(
!
success
))
{
mutex_enter
(
&
block
->
mutex
);
block
->
page
.
buf_fix_count
--
;
buf_block_buf_fix_dec
(
block
);
mutex_exit
(
&
block
->
mutex
);
#ifdef UNIV_SYNC_DEBUG
rw_lock_s_unlock
(
&
(
block
->
debug_latch
));
#endif
return
(
FALSE
);
}
...
...
@@ -2078,14 +2068,9 @@ buf_page_optimistic_get_func(
}
mutex_enter
(
&
block
->
mutex
);
block
->
page
.
buf_fix_count
--
;
buf_block_buf_fix_dec
(
block
);
mutex_exit
(
&
block
->
mutex
);
#ifdef UNIV_SYNC_DEBUG
rw_lock_s_unlock
(
&
(
block
->
debug_latch
));
#endif
return
(
FALSE
);
}
...
...
@@ -2179,15 +2164,9 @@ buf_page_get_known_nowait(
if
(
!
success
)
{
mutex_enter
(
&
block
->
mutex
);
block
->
page
.
buf_fix_count
--
;
buf_block_buf_fix_dec
(
block
);
mutex_exit
(
&
block
->
mutex
);
#ifdef UNIV_SYNC_DEBUG
rw_lock_s_unlock
(
&
(
block
->
debug_latch
));
#endif
return
(
FALSE
);
}
...
...
include/buf0buf.ic
View file @
aafdd9ab
...
...
@@ -874,6 +874,22 @@ buf_block_buf_fix_inc_func(
# define buf_block_buf_fix_inc(b,f,l) buf_block_buf_fix_inc_func(b)
#endif /* UNIV_SYNC_DEBUG */
/***********************************************************************
Decrements the bufferfix count. */
UNIV_INLINE
void
buf_block_buf_fix_dec(
/*==================*/
buf_block_t* block) /* in: block to bufferunfix */
{
ut_ad(mutex_own(&block->mutex));
block->page.buf_fix_count--;
#ifdef UNIV_SYNC_DEBUG
rw_lock_s_unlock(&block->debug_latch);
#endif
}
/**********************************************************************
Returns the control block of a file page, NULL if not found. */
UNIV_INLINE
...
...
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