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
539a9bda
Commit
539a9bda
authored
Apr 30, 2009
by
Barry Perlman
Committed by
Yoni Fogel
Apr 16, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improved comments only
git-svn-id:
file:///svn/toku/tokudb@11700
c7de825b-a66e-492c-adef-691d508d4ae1
parent
78ebdd82
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
2 deletions
+5
-2
newbrt/cachetable.c
newbrt/cachetable.c
+3
-0
newbrt/workqueue.h
newbrt/workqueue.h
+2
-2
No files found.
newbrt/cachetable.c
View file @
539a9bda
...
...
@@ -164,7 +164,10 @@ static inline void cachetable_unlock(CACHETABLE ct __attribute__((unused))) {
}
// Wait for cache table space to become available
// size_current is number of bytes currently occupied by data (referred to by pairs)
// size_writing is number of bytes queued up to be written out (sum of sizes of pairs in CTPAIR_WRITING state)
static
inline
void
cachetable_wait_write
(
CACHETABLE
ct
)
{
// if we're writing more than half the data in the cachetable
while
(
2
*
ct
->
size_writing
>
ct
->
size_current
)
{
workqueue_wait_write
(
&
ct
->
wq
,
0
);
}
...
...
newbrt/workqueue.h
View file @
539a9bda
...
...
@@ -169,7 +169,7 @@ static int workqueue_deq(WORKQUEUE wq, WORKITEM *wiptr, int dolock) {
return
0
;
}
// Suspend
a work queue writer thread
// Suspend
the caller (thread that is currently attempting to put more work items into the work queue)
__attribute__
((
unused
))
static
void
workqueue_wait_write
(
WORKQUEUE
wq
,
int
dolock
)
{
if
(
dolock
)
workqueue_lock
(
wq
);
...
...
@@ -179,7 +179,7 @@ static void workqueue_wait_write(WORKQUEUE wq, int dolock) {
if
(
dolock
)
workqueue_unlock
(
wq
);
}
// Wakeup
the waiting work queue writer threads
// Wakeup
all threads that are currently attempting to put more work items into the work queue
__attribute__
((
unused
))
static
void
workqueue_wakeup_write
(
WORKQUEUE
wq
,
int
dolock
)
{
if
(
wq
->
want_write
)
{
...
...
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