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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
9ac63170
Commit
9ac63170
authored
Feb 01, 2005
by
tulin@mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cleanup and streamlining of thread create/exit in ndb
parent
b018755e
Changes
24
Hide whitespace changes
Inline
Side-by-side
Showing
24 changed files
with
55 additions
and
120 deletions
+55
-120
ndb/include/portlib/NdbThread.h
ndb/include/portlib/NdbThread.h
+1
-1
ndb/src/common/portlib/NdbPortLibTest.cpp
ndb/src/common/portlib/NdbPortLibTest.cpp
+4
-12
ndb/src/common/portlib/NdbThread.c
ndb/src/common/portlib/NdbThread.c
+24
-16
ndb/src/common/transporter/TransporterRegistry.cpp
ndb/src/common/transporter/TransporterRegistry.cpp
+1
-4
ndb/src/common/util/SocketServer.cpp
ndb/src/common/util/SocketServer.cpp
+0
-9
ndb/src/kernel/blocks/ndbfs/AsyncFile.cpp
ndb/src/kernel/blocks/ndbfs/AsyncFile.cpp
+0
-3
ndb/src/kernel/blocks/ndbfs/MemoryChannelTest/MemoryChannelTest.cpp
...rnel/blocks/ndbfs/MemoryChannelTest/MemoryChannelTest.cpp
+0
-4
ndb/src/kernel/vm/WatchDog.cpp
ndb/src/kernel/vm/WatchDog.cpp
+0
-3
ndb/src/mgmclient/CommandInterpreter.cpp
ndb/src/mgmclient/CommandInterpreter.cpp
+1
-5
ndb/src/mgmsrv/MgmtSrvr.cpp
ndb/src/mgmsrv/MgmtSrvr.cpp
+0
-10
ndb/src/ndbapi/ClusterMgr.cpp
ndb/src/ndbapi/ClusterMgr.cpp
+0
-4
ndb/src/ndbapi/TransporterFacade.cpp
ndb/src/ndbapi/TransporterFacade.cpp
+2
-8
ndb/src/ndbapi/ndb_cluster_connection.cpp
ndb/src/ndbapi/ndb_cluster_connection.cpp
+0
-3
ndb/test/ndbapi/benchronja.cpp
ndb/test/ndbapi/benchronja.cpp
+1
-3
ndb/test/ndbapi/flexAsynch.cpp
ndb/test/ndbapi/flexAsynch.cpp
+1
-2
ndb/test/ndbapi/flexBench.cpp
ndb/test/ndbapi/flexBench.cpp
+2
-3
ndb/test/ndbapi/flexHammer.cpp
ndb/test/ndbapi/flexHammer.cpp
+1
-4
ndb/test/ndbapi/flexScan.cpp
ndb/test/ndbapi/flexScan.cpp
+1
-2
ndb/test/ndbapi/flexTT.cpp
ndb/test/ndbapi/flexTT.cpp
+1
-2
ndb/test/ndbapi/flexTimedAsynch.cpp
ndb/test/ndbapi/flexTimedAsynch.cpp
+1
-2
ndb/test/ndbapi/flex_bench_mysql.cpp
ndb/test/ndbapi/flex_bench_mysql.cpp
+14
-15
ndb/test/ndbapi/mainAsyncGenerator.cpp
ndb/test/ndbapi/mainAsyncGenerator.cpp
+0
-2
ndb/test/src/NDBT_Test.cpp
ndb/test/src/NDBT_Test.cpp
+0
-1
ndb/test/tools/transproxy.cpp
ndb/test/tools/transproxy.cpp
+0
-2
No files found.
ndb/include/portlib/NdbThread.h
View file @
9ac63170
...
@@ -76,7 +76,7 @@ int NdbThread_WaitFor(struct NdbThread* p_wait_thread, void** status);
...
@@ -76,7 +76,7 @@ int NdbThread_WaitFor(struct NdbThread* p_wait_thread, void** status);
*
*
* * status: exit code
* * status: exit code
*/
*/
void
NdbThread_Exit
(
int
status
);
void
NdbThread_Exit
(
void
*
status
);
/**
/**
* Set thread concurrency level
* Set thread concurrency level
...
...
ndb/src/common/portlib/NdbPortLibTest.cpp
View file @
9ac63170
...
@@ -54,10 +54,7 @@ extern "C" void* thread1func(void* arg)
...
@@ -54,10 +54,7 @@ extern "C" void* thread1func(void* arg)
if
(
arg1
!=
7
)
if
(
arg1
!=
7
)
fail
(
"TEST1"
,
"Wrong arg"
);
fail
(
"TEST1"
,
"Wrong arg"
);
NdbThread_Exit
(
returnvalue
);
return
returnvalue
;
return
NULL
;
}
}
// test 2 variables and funcs
// test 2 variables and funcs
...
@@ -80,10 +77,7 @@ extern "C" void* test2func(void* arg)
...
@@ -80,10 +77,7 @@ extern "C" void* test2func(void* arg)
fail
(
"TEST2"
,
"Failed to unlock mutex"
);
fail
(
"TEST2"
,
"Failed to unlock mutex"
);
int
returnvalue
=
arg1
;
int
returnvalue
=
arg1
;
NdbThread_Exit
(
returnvalue
);
return
returnvalue
;
return
NULL
;
}
}
...
@@ -129,8 +123,7 @@ extern "C" void* testfunc(void* arg)
...
@@ -129,8 +123,7 @@ extern "C" void* testfunc(void* arg)
}
}
while
(
tmpVar
<
100
);
while
(
tmpVar
<
100
);
NdbThread_Exit
(
0
);
return
0
;
return
NULL
;
}
}
extern
"C"
void
*
testTryLockfunc
(
void
*
arg
)
extern
"C"
void
*
testTryLockfunc
(
void
*
arg
)
...
@@ -169,8 +162,7 @@ extern "C" void* testTryLockfunc(void* arg)
...
@@ -169,8 +162,7 @@ extern "C" void* testTryLockfunc(void* arg)
}
}
while
(
tmpVar
<
100
);
while
(
tmpVar
<
100
);
NdbThread_Exit
(
0
);
return
0
;
return
NULL
;
}
}
...
...
ndb/src/common/portlib/NdbThread.c
View file @
9ac63170
...
@@ -17,7 +17,7 @@
...
@@ -17,7 +17,7 @@
#include <ndb_global.h>
#include <ndb_global.h>
#include <NdbThread.h>
#include <NdbThread.h>
#include <pthread.h>
#include <
my_
pthread.h>
#include <NdbMem.h>
#include <NdbMem.h>
#define MAX_THREAD_NAME 16
#define MAX_THREAD_NAME 16
...
@@ -39,21 +39,29 @@ struct NdbThread
...
@@ -39,21 +39,29 @@ struct NdbThread
static
static
void
*
void
*
ndb_thread_wrapper
(
void
*
_ss
){
ndb_thread_wrapper
(
void
*
_ss
){
void
*
ret
;
my_thread_init
();
struct
NdbThread
*
ss
=
(
struct
NdbThread
*
)
_ss
;
DBUG_ENTER
(
"ndb_thread_wrapper"
);
#ifdef NDB_SHM_TRANSPORTER
if
(
g_ndb_shm_signum
)
{
{
sigset_t
mask
;
DBUG_ENTER
(
"ndb_thread_wrapper"
);
DBUG_PRINT
(
"info"
,(
"Block signum %d"
,
g_ndb_shm_signum
));
#ifdef NDB_SHM_TRANSPORTER
sigemptyset
(
&
mask
);
if
(
g_ndb_shm_signum
)
sigaddset
(
&
mask
,
g_ndb_shm_signum
);
{
pthread_sigmask
(
SIG_BLOCK
,
&
mask
,
0
);
sigset_t
mask
;
}
DBUG_PRINT
(
"info"
,(
"Block signum %d"
,
g_ndb_shm_signum
));
sigemptyset
(
&
mask
);
sigaddset
(
&
mask
,
g_ndb_shm_signum
);
pthread_sigmask
(
SIG_BLOCK
,
&
mask
,
0
);
}
#endif
#endif
ret
=
(
*
ss
->
func
)(
ss
->
object
);
{
DBUG_RETURN
(
ret
);
void
*
ret
;
struct
NdbThread
*
ss
=
(
struct
NdbThread
*
)
_ss
;
ret
=
(
*
ss
->
func
)(
ss
->
object
);
my_thread_end
();
NdbThread_Exit
(
ret
);
}
/* will never be reached */
DBUG_RETURN
(
0
);
}
}
}
...
@@ -130,9 +138,9 @@ int NdbThread_WaitFor(struct NdbThread* p_wait_thread, void** status)
...
@@ -130,9 +138,9 @@ int NdbThread_WaitFor(struct NdbThread* p_wait_thread, void** status)
}
}
void
NdbThread_Exit
(
int
status
)
void
NdbThread_Exit
(
void
*
status
)
{
{
pthread_exit
(
&
status
);
pthread_exit
(
status
);
}
}
...
...
ndb/src/common/transporter/TransporterRegistry.cpp
View file @
9ac63170
...
@@ -1104,11 +1104,8 @@ TransporterRegistry::setIOState(NodeId nodeId, IOState state) {
...
@@ -1104,11 +1104,8 @@ TransporterRegistry::setIOState(NodeId nodeId, IOState state) {
static
void
*
static
void
*
run_start_clients_C
(
void
*
me
)
run_start_clients_C
(
void
*
me
)
{
{
my_thread_init
();
((
TransporterRegistry
*
)
me
)
->
start_clients_thread
();
((
TransporterRegistry
*
)
me
)
->
start_clients_thread
();
my_thread_end
();
return
0
;
NdbThread_Exit
(
0
);
return
me
;
}
}
// Run by kernel thread
// Run by kernel thread
...
...
ndb/src/common/util/SocketServer.cpp
View file @
9ac63170
...
@@ -186,11 +186,7 @@ extern "C"
...
@@ -186,11 +186,7 @@ extern "C"
void
*
void
*
socketServerThread_C
(
void
*
_ss
){
socketServerThread_C
(
void
*
_ss
){
SocketServer
*
ss
=
(
SocketServer
*
)
_ss
;
SocketServer
*
ss
=
(
SocketServer
*
)
_ss
;
my_thread_init
();
ss
->
doRun
();
ss
->
doRun
();
my_thread_end
();
NdbThread_Exit
(
0
);
return
0
;
return
0
;
}
}
...
@@ -309,11 +305,8 @@ void*
...
@@ -309,11 +305,8 @@ void*
sessionThread_C
(
void
*
_sc
){
sessionThread_C
(
void
*
_sc
){
SocketServer
::
Session
*
si
=
(
SocketServer
::
Session
*
)
_sc
;
SocketServer
::
Session
*
si
=
(
SocketServer
::
Session
*
)
_sc
;
my_thread_init
();
if
(
!
transfer
(
si
->
m_socket
)){
if
(
!
transfer
(
si
->
m_socket
)){
si
->
m_stopped
=
true
;
si
->
m_stopped
=
true
;
my_thread_end
();
NdbThread_Exit
(
0
);
return
0
;
return
0
;
}
}
...
@@ -325,8 +318,6 @@ sessionThread_C(void* _sc){
...
@@ -325,8 +318,6 @@ sessionThread_C(void* _sc){
}
}
si
->
m_stopped
=
true
;
si
->
m_stopped
=
true
;
my_thread_end
();
NdbThread_Exit
(
0
);
return
0
;
return
0
;
}
}
...
...
ndb/src/kernel/blocks/ndbfs/AsyncFile.cpp
View file @
9ac63170
...
@@ -82,7 +82,6 @@ static int numAsyncFiles = 0;
...
@@ -82,7 +82,6 @@ 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
);
}
}
...
@@ -876,8 +875,6 @@ void AsyncFile::endReq()
...
@@ -876,8 +875,6 @@ 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
);
}
}
...
...
ndb/src/kernel/blocks/ndbfs/MemoryChannelTest/MemoryChannelTest.cpp
View file @
9ac63170
...
@@ -40,7 +40,6 @@ extern "C" void* runProducer(void*arg)
...
@@ -40,7 +40,6 @@ extern "C" void* runProducer(void*arg)
NdbSleep_MilliSleep
(
i
);
NdbSleep_MilliSleep
(
i
);
i
++
;
i
++
;
}
}
NdbThread_Exit
(
0
);
return
NULL
;
return
NULL
;
}
}
...
@@ -58,7 +57,6 @@ extern "C" void* runConsumer(void* arg)
...
@@ -58,7 +57,6 @@ extern "C" void* runConsumer(void* arg)
delete
p
;
delete
p
;
}
}
NdbThread_Exit
(
0
);
return
NULL
;
return
NULL
;
}
}
...
@@ -92,7 +90,6 @@ extern "C" void* runProducer2(void*arg)
...
@@ -92,7 +90,6 @@ extern "C" void* runProducer2(void*arg)
NdbSleep_MilliSleep
(
i
);
NdbSleep_MilliSleep
(
i
);
i
++
;
i
++
;
}
}
NdbThread_Exit
(
0
);
return
NULL
;
return
NULL
;
}
}
...
@@ -111,7 +108,6 @@ extern "C" void* runConsumer2(void* arg)
...
@@ -111,7 +108,6 @@ extern "C" void* runConsumer2(void* arg)
delete
p
;
delete
p
;
}
}
ndbout
<<
"Consumer2: "
<<
count
<<
" received"
<<
endl
;
ndbout
<<
"Consumer2: "
<<
count
<<
" received"
<<
endl
;
NdbThread_Exit
(
0
);
return
NULL
;
return
NULL
;
}
}
...
...
ndb/src/kernel/vm/WatchDog.cpp
View file @
9ac63170
...
@@ -27,10 +27,7 @@
...
@@ -27,10 +27,7 @@
extern
"C"
extern
"C"
void
*
void
*
runWatchDog
(
void
*
w
){
runWatchDog
(
void
*
w
){
my_thread_init
();
((
WatchDog
*
)
w
)
->
run
();
((
WatchDog
*
)
w
)
->
run
();
my_thread_end
();
NdbThread_Exit
(
0
);
return
NULL
;
return
NULL
;
}
}
...
...
ndb/src/mgmclient/CommandInterpreter.cpp
View file @
9ac63170
...
@@ -457,8 +457,6 @@ event_thread_run(void* m)
...
@@ -457,8 +457,6 @@ event_thread_run(void* m)
{
{
NdbMgmHandle
handle
=
*
(
NdbMgmHandle
*
)
m
;
NdbMgmHandle
handle
=
*
(
NdbMgmHandle
*
)
m
;
my_thread_init
();
int
filter
[]
=
{
15
,
NDB_MGM_EVENT_CATEGORY_BACKUP
,
0
};
int
filter
[]
=
{
15
,
NDB_MGM_EVENT_CATEGORY_BACKUP
,
0
};
int
fd
=
ndb_mgm_listen_event
(
handle
,
filter
);
int
fd
=
ndb_mgm_listen_event
(
handle
,
filter
);
if
(
fd
>
0
)
if
(
fd
>
0
)
...
@@ -478,9 +476,7 @@ event_thread_run(void* m)
...
@@ -478,9 +476,7 @@ event_thread_run(void* m)
do_event_thread
=
-
1
;
do_event_thread
=
-
1
;
}
}
my_thread_end
();
return
NULL
;
NdbThread_Exit
(
0
);
return
0
;
}
}
bool
bool
...
...
ndb/src/mgmsrv/MgmtSrvr.cpp
View file @
9ac63170
...
@@ -70,12 +70,7 @@ void *
...
@@ -70,12 +70,7 @@ void *
MgmtSrvr
::
logLevelThread_C
(
void
*
m
)
MgmtSrvr
::
logLevelThread_C
(
void
*
m
)
{
{
MgmtSrvr
*
mgm
=
(
MgmtSrvr
*
)
m
;
MgmtSrvr
*
mgm
=
(
MgmtSrvr
*
)
m
;
my_thread_init
();
mgm
->
logLevelThreadRun
();
mgm
->
logLevelThreadRun
();
my_thread_end
();
NdbThread_Exit
(
0
);
/* NOTREACHED */
return
0
;
return
0
;
}
}
...
@@ -83,12 +78,7 @@ void *
...
@@ -83,12 +78,7 @@ void *
MgmtSrvr
::
signalRecvThread_C
(
void
*
m
)
MgmtSrvr
::
signalRecvThread_C
(
void
*
m
)
{
{
MgmtSrvr
*
mgm
=
(
MgmtSrvr
*
)
m
;
MgmtSrvr
*
mgm
=
(
MgmtSrvr
*
)
m
;
my_thread_init
();
mgm
->
signalRecvThreadRun
();
mgm
->
signalRecvThreadRun
();
my_thread_end
();
NdbThread_Exit
(
0
);
/* NOTREACHED */
return
0
;
return
0
;
}
}
...
...
ndb/src/ndbapi/ClusterMgr.cpp
View file @
9ac63170
...
@@ -54,7 +54,6 @@ runClusterMgr_C(void * me)
...
@@ -54,7 +54,6 @@ runClusterMgr_C(void * me)
#ifdef NDB_OSE
#ifdef NDB_OSE
NdbSleep_MilliSleep
(
50
);
NdbSleep_MilliSleep
(
50
);
#endif
#endif
NdbThread_Exit
(
0
);
return
NULL
;
return
NULL
;
}
}
...
@@ -560,10 +559,7 @@ extern "C"
...
@@ -560,10 +559,7 @@ extern "C"
void
*
void
*
runArbitMgr_C
(
void
*
me
)
runArbitMgr_C
(
void
*
me
)
{
{
my_thread_init
();
((
ArbitMgr
*
)
me
)
->
threadMain
();
((
ArbitMgr
*
)
me
)
->
threadMain
();
my_thread_end
();
NdbThread_Exit
(
0
);
return
NULL
;
return
NULL
;
}
}
...
...
ndb/src/ndbapi/TransporterFacade.cpp
View file @
9ac63170
...
@@ -405,11 +405,8 @@ extern "C"
...
@@ -405,11 +405,8 @@ extern "C"
void
*
void
*
runSendRequest_C
(
void
*
me
)
runSendRequest_C
(
void
*
me
)
{
{
my_thread_init
();
((
TransporterFacade
*
)
me
)
->
threadMainSend
();
((
TransporterFacade
*
)
me
)
->
threadMainSend
();
my_thread_end
();
return
0
;
NdbThread_Exit
(
0
);
return
me
;
}
}
void
TransporterFacade
::
threadMainSend
(
void
)
void
TransporterFacade
::
threadMainSend
(
void
)
...
@@ -443,11 +440,8 @@ extern "C"
...
@@ -443,11 +440,8 @@ extern "C"
void
*
void
*
runReceiveResponse_C
(
void
*
me
)
runReceiveResponse_C
(
void
*
me
)
{
{
my_thread_init
();
((
TransporterFacade
*
)
me
)
->
threadMainReceive
();
((
TransporterFacade
*
)
me
)
->
threadMainReceive
();
my_thread_end
();
return
0
;
NdbThread_Exit
(
0
);
return
me
;
}
}
void
TransporterFacade
::
threadMainReceive
(
void
)
void
TransporterFacade
::
threadMainReceive
(
void
)
...
...
ndb/src/ndbapi/ndb_cluster_connection.cpp
View file @
9ac63170
...
@@ -87,11 +87,8 @@ const char *Ndb_cluster_connection::get_connectstring(char *buf,
...
@@ -87,11 +87,8 @@ const char *Ndb_cluster_connection::get_connectstring(char *buf,
extern
"C"
pthread_handler_decl
(
run_ndb_cluster_connection_connect_thread
,
me
)
extern
"C"
pthread_handler_decl
(
run_ndb_cluster_connection_connect_thread
,
me
)
{
{
my_thread_init
();
g_run_connect_thread
=
1
;
g_run_connect_thread
=
1
;
((
Ndb_cluster_connection_impl
*
)
me
)
->
connect_thread
();
((
Ndb_cluster_connection_impl
*
)
me
)
->
connect_thread
();
my_thread_end
();
NdbThread_Exit
(
0
);
return
me
;
return
me
;
}
}
...
...
ndb/test/ndbapi/benchronja.cpp
View file @
9ac63170
...
@@ -984,7 +984,6 @@ void* ThreadExec(void* ThreadData){
...
@@ -984,7 +984,6 @@ void* ThreadExec(void* ThreadData){
delete
pMyNdb
;
delete
pMyNdb
;
pMyNdb
=
NULL
;
pMyNdb
=
NULL
;
ThreadReady
[
thread_no
]
=
1
;
ThreadReady
[
thread_no
]
=
1
;
NdbThread_Exit
(
0
)
;
return
0
;
return
0
;
}
//if
}
//if
...
@@ -1197,7 +1196,6 @@ void* ThreadExec(void* ThreadData){
...
@@ -1197,7 +1196,6 @@ void* ThreadExec(void* ThreadData){
}
// for(;;)
}
// for(;;)
delete
pMyNdb
;
delete
pMyNdb
;
NdbThread_Exit
(
0
)
;
return
0
;
return
0
;
// Compiler is happy now
}
}
ndb/test/ndbapi/flexAsynch.cpp
View file @
9ac63170
...
@@ -494,8 +494,7 @@ threadLoop(void* ThreadData)
...
@@ -494,8 +494,7 @@ threadLoop(void* ThreadData)
delete
localNdb
;
delete
localNdb
;
ThreadReady
[
threadNo
]
=
1
;
ThreadReady
[
threadNo
]
=
1
;
NdbThread_Exit
(
0
);
return
NULL
;
return
NULL
;
// Just to keep compiler happy
}
//threadLoop()
}
//threadLoop()
static
static
...
...
ndb/test/ndbapi/flexBench.cpp
View file @
9ac63170
...
@@ -617,7 +617,7 @@ static void* flexBenchThread(void* pArg)
...
@@ -617,7 +617,7 @@ static void* flexBenchThread(void* pArg)
free
(
attrRefValue
)
;
free
(
attrRefValue
)
;
free
(
pOps
)
;
free
(
pOps
)
;
delete
pNdb
;
delete
pNdb
;
NdbThread_Exit
(
0
)
;
return
0
;
// thread exits
}
}
pNdb
->
init
();
pNdb
->
init
();
...
@@ -934,8 +934,7 @@ static void* flexBenchThread(void* pArg)
...
@@ -934,8 +934,7 @@ static void* flexBenchThread(void* pArg)
free
(
longKeyAttrValue
);
free
(
longKeyAttrValue
);
}
// if
}
// if
NdbThread_Exit
(
0
);
return
NULL
;
// Thread exits
return
NULL
;
// Just to keep compiler happy
}
}
...
...
ndb/test/ndbapi/flexHammer.cpp
View file @
9ac63170
...
@@ -612,10 +612,7 @@ flexHammerThread(void* pArg)
...
@@ -612,10 +612,7 @@ flexHammerThread(void* pArg)
flexHammerErrorData
->
resetErrorCounters
();
flexHammerErrorData
->
resetErrorCounters
();
// And exit using NDBT
return
NULL
;
// thread exits
NdbThread_Exit
(
0
);
return
NULL
;
}
// flexHammerThread
}
// flexHammerThread
...
...
ndb/test/ndbapi/flexScan.cpp
View file @
9ac63170
...
@@ -701,8 +701,7 @@ flexScanThread(void* ThreadData)
...
@@ -701,8 +701,7 @@ flexScanThread(void* ThreadData)
free
(
pkValue
);
free
(
pkValue
);
}
// if
}
// if
NdbThread_Exit
(
0
);
return
NULL
;
// thread exits
return
NULL
;
}
// flexScanThread
}
// flexScanThread
...
...
ndb/test/ndbapi/flexTT.cpp
View file @
9ac63170
...
@@ -389,8 +389,7 @@ threadLoop(void* ThreadData)
...
@@ -389,8 +389,7 @@ threadLoop(void* ThreadData)
delete
localNdb
;
delete
localNdb
;
ThreadReady
[
loc_threadNo
]
=
1
;
ThreadReady
[
loc_threadNo
]
=
1
;
NdbThread_Exit
(
0
);
return
NULL
;
// Thread exits
return
NULL
;
// Just to keep compiler happy
}
//threadLoop()
}
//threadLoop()
static
static
...
...
ndb/test/ndbapi/flexTimedAsynch.cpp
View file @
9ac63170
...
@@ -406,9 +406,8 @@ threadLoop(void* ThreadData)
...
@@ -406,9 +406,8 @@ threadLoop(void* ThreadData)
delete
localNdb
;
delete
localNdb
;
ThreadReady
[
threadNo
]
=
1
;
ThreadReady
[
threadNo
]
=
1
;
NdbThread_Exit
(
0
);
return
NULL
;
return
NULL
;
// thread exits
}
}
void
executeThread
(
StartType
aType
,
Ndb
*
aNdbObject
,
ThreadNdb
*
threadInfo
)
void
executeThread
(
StartType
aType
,
Ndb
*
aNdbObject
,
ThreadNdb
*
threadInfo
)
...
...
ndb/test/ndbapi/flex_bench_mysql.cpp
View file @
9ac63170
...
@@ -710,7 +710,7 @@ static void* flexBenchThread(void* pArg)
...
@@ -710,7 +710,7 @@ static void* flexBenchThread(void* pArg)
the_socket_name
,
the_socket_name
,
0
)
==
NULL
)
{
0
)
==
NULL
)
{
ndbout
<<
"failed"
<<
endl
;
ndbout
<<
"failed"
<<
endl
;
NdbThread_Exit
(
0
)
;
return
0
;
}
}
ndbout
<<
"ok"
<<
endl
;
ndbout
<<
"ok"
<<
endl
;
...
@@ -722,7 +722,7 @@ static void* flexBenchThread(void* pArg)
...
@@ -722,7 +722,7 @@ static void* flexBenchThread(void* pArg)
if
(
r
)
{
if
(
r
)
{
ndbout
<<
"autocommit on/off failed"
<<
endl
;
ndbout
<<
"autocommit on/off failed"
<<
endl
;
NdbThread_Exit
(
0
)
;
return
0
;
}
}
}
}
#endif
#endif
...
@@ -741,7 +741,7 @@ static void* flexBenchThread(void* pArg)
...
@@ -741,7 +741,7 @@ static void* flexBenchThread(void* pArg)
ndbout
<<
threadNo
<<
endl
;
ndbout
<<
threadNo
<<
endl
;
ndbout
<<
"Thread #"
<<
threadNo
<<
" will now exit"
<<
endl
;
ndbout
<<
"Thread #"
<<
threadNo
<<
" will now exit"
<<
endl
;
tResult
=
13
;
tResult
=
13
;
NdbThread_Exit
(
0
)
;
return
0
;
}
}
if
(
use_ndb
)
{
if
(
use_ndb
)
{
...
@@ -750,7 +750,7 @@ static void* flexBenchThread(void* pArg)
...
@@ -750,7 +750,7 @@ static void* flexBenchThread(void* pArg)
ndbout
<<
"Failed to get an NDB object"
<<
endl
;
ndbout
<<
"Failed to get an NDB object"
<<
endl
;
ndbout
<<
"Thread #"
<<
threadNo
<<
" will now exit"
<<
endl
;
ndbout
<<
"Thread #"
<<
threadNo
<<
" will now exit"
<<
endl
;
tResult
=
13
;
tResult
=
13
;
NdbThread_Exit
(
0
)
;
return
0
;
}
}
pNdb
->
waitUntilReady
();
pNdb
->
waitUntilReady
();
return_ndb_object
(
pNdb
,
ndb_id
);
return_ndb_object
(
pNdb
,
ndb_id
);
...
@@ -900,11 +900,11 @@ static void* flexBenchThread(void* pArg)
...
@@ -900,11 +900,11 @@ static void* flexBenchThread(void* pArg)
prep_insert
[
i
]
=
mysql_prepare
(
&
mysql
,
buf
,
pos
);
prep_insert
[
i
]
=
mysql_prepare
(
&
mysql
,
buf
,
pos
);
if
(
prep_insert
[
i
]
==
0
)
{
if
(
prep_insert
[
i
]
==
0
)
{
ndbout
<<
"mysql_prepare: "
<<
mysql_error
(
&
mysql
)
<<
endl
;
ndbout
<<
"mysql_prepare: "
<<
mysql_error
(
&
mysql
)
<<
endl
;
NdbThread_Exit
(
0
)
;
return
0
;
}
}
if
(
mysql_bind_param
(
prep_insert
[
i
],
bind_insert
))
{
if
(
mysql_bind_param
(
prep_insert
[
i
],
bind_insert
))
{
ndbout
<<
"mysql_bind_param: "
<<
mysql_error
(
&
mysql
)
<<
endl
;
ndbout
<<
"mysql_bind_param: "
<<
mysql_error
(
&
mysql
)
<<
endl
;
NdbThread_Exit
(
0
)
;
return
0
;
}
}
}
}
...
@@ -926,11 +926,11 @@ static void* flexBenchThread(void* pArg)
...
@@ -926,11 +926,11 @@ static void* flexBenchThread(void* pArg)
prep_update
[
i
]
=
mysql_prepare
(
&
mysql
,
buf
,
pos
);
prep_update
[
i
]
=
mysql_prepare
(
&
mysql
,
buf
,
pos
);
if
(
prep_update
[
i
]
==
0
)
{
if
(
prep_update
[
i
]
==
0
)
{
ndbout
<<
"mysql_prepare: "
<<
mysql_error
(
&
mysql
)
<<
endl
;
ndbout
<<
"mysql_prepare: "
<<
mysql_error
(
&
mysql
)
<<
endl
;
NdbThread_Exit
(
0
)
;
return
0
;
}
}
if
(
mysql_bind_param
(
prep_update
[
i
],
bind_update
))
{
if
(
mysql_bind_param
(
prep_update
[
i
],
bind_update
))
{
ndbout
<<
"mysql_bind_param: "
<<
mysql_error
(
&
mysql
)
<<
endl
;
ndbout
<<
"mysql_bind_param: "
<<
mysql_error
(
&
mysql
)
<<
endl
;
NdbThread_Exit
(
0
)
;
return
0
;
}
}
}
}
...
@@ -953,15 +953,15 @@ static void* flexBenchThread(void* pArg)
...
@@ -953,15 +953,15 @@ static void* flexBenchThread(void* pArg)
prep_read
[
i
]
=
mysql_prepare
(
&
mysql
,
buf
,
pos
);
prep_read
[
i
]
=
mysql_prepare
(
&
mysql
,
buf
,
pos
);
if
(
prep_read
[
i
]
==
0
)
{
if
(
prep_read
[
i
]
==
0
)
{
ndbout
<<
"mysql_prepare: "
<<
mysql_error
(
&
mysql
)
<<
endl
;
ndbout
<<
"mysql_prepare: "
<<
mysql_error
(
&
mysql
)
<<
endl
;
NdbThread_Exit
(
0
)
;
return
0
;
}
}
if
(
mysql_bind_param
(
prep_read
[
i
],
bind_read
))
{
if
(
mysql_bind_param
(
prep_read
[
i
],
bind_read
))
{
ndbout
<<
"mysql_bind_param: "
<<
mysql_error
(
&
mysql
)
<<
endl
;
ndbout
<<
"mysql_bind_param: "
<<
mysql_error
(
&
mysql
)
<<
endl
;
NdbThread_Exit
(
0
)
;
return
0
;
}
}
if
(
mysql_bind_result
(
prep_read
[
i
],
&
bind_read
[
1
]))
{
if
(
mysql_bind_result
(
prep_read
[
i
],
&
bind_read
[
1
]))
{
ndbout
<<
"mysql_bind_result: "
<<
mysql_error
(
&
mysql
)
<<
endl
;
ndbout
<<
"mysql_bind_result: "
<<
mysql_error
(
&
mysql
)
<<
endl
;
NdbThread_Exit
(
0
)
;
return
0
;
}
}
}
}
...
@@ -978,11 +978,11 @@ static void* flexBenchThread(void* pArg)
...
@@ -978,11 +978,11 @@ static void* flexBenchThread(void* pArg)
prep_delete
[
i
]
=
mysql_prepare
(
&
mysql
,
buf
,
pos
);
prep_delete
[
i
]
=
mysql_prepare
(
&
mysql
,
buf
,
pos
);
if
(
prep_delete
[
i
]
==
0
)
{
if
(
prep_delete
[
i
]
==
0
)
{
ndbout
<<
"mysql_prepare: "
<<
mysql_error
(
&
mysql
)
<<
endl
;
ndbout
<<
"mysql_prepare: "
<<
mysql_error
(
&
mysql
)
<<
endl
;
NdbThread_Exit
(
0
)
;
return
0
;
}
}
if
(
mysql_bind_param
(
prep_delete
[
i
],
bind_delete
))
{
if
(
mysql_bind_param
(
prep_delete
[
i
],
bind_delete
))
{
ndbout
<<
"mysql_bind_param: "
<<
mysql_error
(
&
mysql
)
<<
endl
;
ndbout
<<
"mysql_bind_param: "
<<
mysql_error
(
&
mysql
)
<<
endl
;
NdbThread_Exit
(
0
)
;
return
0
;
}
}
}
}
}
}
...
@@ -1431,8 +1431,7 @@ static void* flexBenchThread(void* pArg)
...
@@ -1431,8 +1431,7 @@ static void* flexBenchThread(void* pArg)
ndbout
<<
"I got here "
<<
endl
;
ndbout
<<
"I got here "
<<
endl
;
return_ndb_object
(
pNdb
,
ndb_id
);
return_ndb_object
(
pNdb
,
ndb_id
);
}
}
NdbThread_Exit
(
0
);
return
NULL
;
return
NULL
;
// Just to keep compiler happy
}
}
...
...
ndb/test/ndbapi/mainAsyncGenerator.cpp
View file @
9ac63170
...
@@ -274,8 +274,6 @@ threadRoutine(void *arg)
...
@@ -274,8 +274,6 @@ threadRoutine(void *arg)
asyncDbDisconnect
(
pNDB
);
asyncDbDisconnect
(
pNDB
);
NdbThread_Exit
(
0
);
return
NULL
;
return
NULL
;
}
}
...
...
ndb/test/src/NDBT_Test.cpp
View file @
9ac63170
...
@@ -475,7 +475,6 @@ void *
...
@@ -475,7 +475,6 @@ void *
runStep_C
(
void
*
s
)
runStep_C
(
void
*
s
)
{
{
runStep
(
s
);
runStep
(
s
);
NdbThread_Exit
(
0
);
return
NULL
;
return
NULL
;
}
}
...
...
ndb/test/tools/transproxy.cpp
View file @
9ac63170
...
@@ -291,7 +291,6 @@ extern "C" void*
...
@@ -291,7 +291,6 @@ extern "C" void*
copyrun_C
(
void
*
copy
)
copyrun_C
(
void
*
copy
)
{
{
((
Copy
*
)
copy
)
->
run
();
((
Copy
*
)
copy
)
->
run
();
NdbThread_Exit
(
0
);
return
0
;
return
0
;
}
}
...
@@ -322,7 +321,6 @@ extern "C" void*
...
@@ -322,7 +321,6 @@ extern "C" void*
connrun_C
(
void
*
conn
)
connrun_C
(
void
*
conn
)
{
{
((
Conn
*
)
conn
)
->
run
();
((
Conn
*
)
conn
)
->
run
();
NdbThread_Exit
(
0
);
return
0
;
return
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