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
7b6f516e
Commit
7b6f516e
authored
Dec 18, 2010
by
Bradley C. Kuszmaul
Committed by
Yoni Fogel
Apr 16, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix #3160. close[t:3160]
git-svn-id:
file:///svn/toku/tokudb@26806
c7de825b-a66e-492c-adef-691d508d4ae1
parent
9026b5e0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
1 deletion
+20
-1
newbrt/brt-serialize.c
newbrt/brt-serialize.c
+20
-1
No files found.
newbrt/brt-serialize.c
View file @
7b6f516e
...
...
@@ -43,6 +43,9 @@ toku_brt_serialize_destroy(void) {
return
0
;
}
// #define USE_PWRITE_LOCK
#ifdef USE_PWRITE_LOCK
// This mutex protects pwrite from running in parallel, and also protects modifications to the block allocator.
static
toku_pthread_mutex_t
pwrite_mutex
=
TOKU_PTHREAD_MUTEX_INITIALIZER
;
static
int
pwrite_is_locked
=
0
;
...
...
@@ -71,7 +74,23 @@ unlock_for_pwrite (void) {
pwrite_is_locked
=
0
;
int
r
=
toku_pthread_mutex_unlock
(
&
pwrite_mutex
);
resource_assert_zero
(
r
);
}
#else
static
const
int
pwrite_is_locked
=
1
;
int
toku_pwrite_lock_init
(
void
)
{
return
0
;
}
int
toku_pwrite_lock_destroy
(
void
)
{
return
0
;
}
static
inline
void
lock_for_pwrite
(
void
)
{
}
static
inline
void
unlock_for_pwrite
(
void
)
{
}
#endif
enum
{
FILE_CHANGE_INCREMENT
=
(
16
<<
20
)};
...
...
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