mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2026-01-21 00:48:54 +01:00
client stage2 ongoing, utils removed but not compile ready; left to do imod for every multi, connect client to multi
This commit is contained in:
@@ -5,17 +5,11 @@
|
||||
|
||||
static void* startProcessData(void *n){
|
||||
postProcessing *myDet=(postProcessing*)n;
|
||||
myDet->processData(1);
|
||||
myDet->processData();
|
||||
pthread_exit(NULL);
|
||||
|
||||
};
|
||||
|
||||
static void* startProcessDataNoDelete(void *n){
|
||||
postProcessing *myDet=(postProcessing*)n;
|
||||
myDet->processData(0);
|
||||
pthread_exit(NULL);
|
||||
|
||||
};
|
||||
|
||||
|
||||
int postProcessing::kbhit(){
|
||||
@@ -57,7 +51,7 @@ postProcessing::~postProcessing(){
|
||||
}
|
||||
|
||||
|
||||
void* postProcessing::processData(int delflag) {
|
||||
void* postProcessing::processData() {
|
||||
if(setReceiverOnline()==OFFLINE_FLAG){
|
||||
return 0;
|
||||
} //receiver
|
||||
@@ -138,7 +132,7 @@ void postProcessing::setJoinThread( int v) {
|
||||
|
||||
|
||||
|
||||
void postProcessing::startThread(int delflag) {
|
||||
void postProcessing::startThread() {
|
||||
|
||||
|
||||
setTotalProgress();
|
||||
@@ -164,11 +158,9 @@ void postProcessing::startThread(int delflag) {
|
||||
|
||||
ret = pthread_setschedparam(pthread_self(), policy, &mparam);
|
||||
|
||||
if (delflag)
|
||||
|
||||
ret = pthread_create(&dataProcessingThread, &tattr,startProcessData, (void*)this);
|
||||
else
|
||||
ret = pthread_create(&dataProcessingThread, &tattr,startProcessDataNoDelete, (void*)this);
|
||||
|
||||
|
||||
if (ret)
|
||||
printf("ret %d\n", ret);
|
||||
|
||||
|
||||
@@ -38,10 +38,9 @@ public:
|
||||
int setThreadedProcessing(int b=-1) {if (b>=0) *threadedProcessing=b; return *threadedProcessing;};
|
||||
|
||||
/** processes the data
|
||||
\param delflag 0 leaves the data in the final data queue
|
||||
\returns nothing
|
||||
*/
|
||||
void *processData(int delflag);
|
||||
void *processData();
|
||||
|
||||
int checkJoinThread();
|
||||
void setJoinThread(int v);
|
||||
@@ -62,7 +61,7 @@ protected:
|
||||
/**
|
||||
start data processing thread
|
||||
*/
|
||||
void startThread(int delflag=1);
|
||||
void startThread();
|
||||
|
||||
/** mutex to synchronize main and data processing threads */
|
||||
pthread_mutex_t mp;
|
||||
|
||||
Reference in New Issue
Block a user