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
89d79a9f
Commit
89d79a9f
authored
Jan 11, 2005
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug#7477
parent
d71ec620
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
22 deletions
+7
-22
ndb/src/kernel/blocks/ndbfs/AsyncFile.cpp
ndb/src/kernel/blocks/ndbfs/AsyncFile.cpp
+7
-22
No files found.
ndb/src/kernel/blocks/ndbfs/AsyncFile.cpp
View file @
89d79a9f
...
@@ -14,19 +14,11 @@
...
@@ -14,19 +14,11 @@
along with this program; if not, write to the Free Software
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
/**
* O_DIRECT
*/
#if 0
//#ifdef NDB_LINUX
#ifndef _GNU_SOURCE
#define _GNU_SOURCE
#endif
#endif
#include <ndb_global.h>
#include <ndb_global.h>
#include <my_sys.h>
#include <my_pthread.h>
#include
"Error.hpp"
#include
<Error.hpp>
#include "AsyncFile.hpp"
#include "AsyncFile.hpp"
#include <ErrorHandlingMacros.hpp>
#include <ErrorHandlingMacros.hpp>
...
@@ -35,15 +27,6 @@
...
@@ -35,15 +27,6 @@
#include <NdbThread.h>
#include <NdbThread.h>
#include <signaldata/FsOpenReq.hpp>
#include <signaldata/FsOpenReq.hpp>
#if 0
#ifdef HAVE_PREAD
// This is for pread and pwrite
#ifndef __USE_UNIX98
#define __USE_UNIX98
#endif
#endif
#endif
#if defined NDB_WIN32 || defined NDB_OSE || defined NDB_SOFTOSE
#if defined NDB_WIN32 || defined NDB_OSE || defined NDB_SOFTOSE
#else
#else
// For readv and writev
// For readv and writev
...
@@ -91,6 +74,7 @@ static int numAsyncFiles = 0;
...
@@ -91,6 +74,7 @@ static int numAsyncFiles = 0;
extern
"C"
void
*
runAsyncFile
(
void
*
arg
)
extern
"C"
void
*
runAsyncFile
(
void
*
arg
)
{
{
my_thread_init
();
((
AsyncFile
*
)
arg
)
->
run
();
((
AsyncFile
*
)
arg
)
->
run
();
return
(
NULL
);
return
(
NULL
);
}
}
...
@@ -419,7 +403,7 @@ AsyncFile::readBuffer(char * buf, size_t size, off_t offset){
...
@@ -419,7 +403,7 @@ AsyncFile::readBuffer(char * buf, size_t size, off_t offset){
#elif defined NDB_OSE || defined NDB_SOFTOSE
#elif defined NDB_OSE || defined NDB_SOFTOSE
return_value
=
::
read
(
theFd
,
buf
,
size
);
return_value
=
::
read
(
theFd
,
buf
,
size
);
#else // UNIX
#else // UNIX
return_value
=
::
pread
(
theFd
,
buf
,
size
,
offset
);
return_value
=
my_pread
(
theFd
,
buf
,
size
,
offset
,
0
);
#endif
#endif
#ifndef NDB_WIN32
#ifndef NDB_WIN32
if
(
return_value
==
-
1
&&
errno
==
EINTR
)
{
if
(
return_value
==
-
1
&&
errno
==
EINTR
)
{
...
@@ -653,7 +637,7 @@ AsyncFile::writeBuffer(const char * buf, size_t size, off_t offset,
...
@@ -653,7 +637,7 @@ AsyncFile::writeBuffer(const char * buf, size_t size, off_t offset,
#elif defined NDB_OSE || defined NDB_SOFTOSE
#elif defined NDB_OSE || defined NDB_SOFTOSE
return_value
=
::
write
(
theFd
,
buf
,
bytes_to_write
);
return_value
=
::
write
(
theFd
,
buf
,
bytes_to_write
);
#else // UNIX
#else // UNIX
return_value
=
::
pwrite
(
theFd
,
buf
,
bytes_to_write
,
offset
);
return_value
=
my_pwrite
(
theFd
,
buf
,
bytes_to_write
,
offset
,
0
);
#endif
#endif
#ifndef NDB_WIN32
#ifndef NDB_WIN32
if
(
return_value
==
-
1
&&
errno
==
EINTR
)
{
if
(
return_value
==
-
1
&&
errno
==
EINTR
)
{
...
@@ -889,6 +873,7 @@ void AsyncFile::endReq()
...
@@ -889,6 +873,7 @@ void AsyncFile::endReq()
{
{
// Thread is ended with return
// Thread is ended with return
if
(
theWriteBuffer
)
NdbMem_Free
(
theWriteBuffer
);
if
(
theWriteBuffer
)
NdbMem_Free
(
theWriteBuffer
);
my_thread_end
();
NdbThread_Exit
(
0
);
NdbThread_Exit
(
0
);
}
}
...
...
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