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
fa11c5bf
Commit
fa11c5bf
authored
Jul 04, 2005
by
joreland@mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ndb -
fix bug in MemoryChannel
parent
5ec5cde2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
4 deletions
+14
-4
ndb/src/kernel/blocks/ndbfs/AsyncFile.cpp
ndb/src/kernel/blocks/ndbfs/AsyncFile.cpp
+3
-1
ndb/src/kernel/blocks/ndbfs/MemoryChannel.hpp
ndb/src/kernel/blocks/ndbfs/MemoryChannel.hpp
+11
-3
No files found.
ndb/src/kernel/blocks/ndbfs/AsyncFile.cpp
View file @
fa11c5bf
...
...
@@ -226,7 +226,9 @@ AsyncFile::run()
abort
();
break
;
}
//switch
theReportTo
->
writeChannel
(
request
);
// No need to signal as ndbfs only uses tryRead
theReportTo
->
writeChannelNoSignal
(
request
);
}
//while
}
//AsyncFile::run()
...
...
ndb/src/kernel/blocks/ndbfs/MemoryChannel.hpp
View file @
fa11c5bf
...
...
@@ -84,7 +84,8 @@ public:
MemoryChannel
(
int
size
=
256
);
virtual
~
MemoryChannel
(
);
virtual
void
writeChannel
(
T
*
t
);
void
writeChannel
(
T
*
t
);
void
writeChannelNoSignal
(
T
*
t
);
T
*
readChannel
();
T
*
tryReadChannel
();
...
...
@@ -127,6 +128,15 @@ template <class T> void MemoryChannel<T>::writeChannel( T *t)
NdbCondition_Signal
(
theConditionPtr
);
}
template
<
class
T
>
void
MemoryChannel
<
T
>::
writeChannelNoSignal
(
T
*
t
)
{
NdbMutex_Lock
(
theMutexPtr
);
if
(
full
(
theWriteIndex
,
theReadIndex
)
||
theChannel
==
NULL
)
abort
();
theChannel
[
theWriteIndex
]
=
t
;
++
theWriteIndex
;
NdbMutex_Unlock
(
theMutexPtr
);
}
template
<
class
T
>
T
*
MemoryChannel
<
T
>::
readChannel
()
{
...
...
@@ -149,8 +159,6 @@ template <class T> T* MemoryChannel<T>::tryReadChannel()
{
T
*
tmp
=
0
;
NdbMutex_Lock
(
theMutexPtr
);
NdbCondition_WaitTimeout
(
theConditionPtr
,
theMutexPtr
,
0
);
if
(
!
empty
(
theWriteIndex
,
theReadIndex
)
)
{
tmp
=
theChannel
[
theReadIndex
];
...
...
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