Moving the definition of the destructor to the .C file.
authorFilippo Gioachin <gioachin@uiuc.edu>
Sun, 24 Jan 2010 06:07:46 +0000 (00:07 -0600)
committerFilippo Gioachin <gioachin@uiuc.edu>
Sun, 24 Jan 2010 06:07:46 +0000 (00:07 -0600)
This is because of a problem with xlC that fails when compiling optimized code.

src/ck-core/ckcallback.C
src/ck-core/ckcallback.h

index 26fd0e55a08fdab245c69dc768ddd766c1d9b27c..0b0aa7f5da6aa64a61106eb344f8caa843686ee0 100644 (file)
@@ -314,6 +314,12 @@ void CkCallback::thread_destroy() const {
   }
 }
 
+CkCallbackResumeThread::~CkCallbackResumeThread() {
+  void * res = thread_delay(); //<- block thread here if it hasn't already
+  if (result != NULL) *result = res;
+  else CkFreeMsg(res);
+  thread_destroy();
+}
 
 /****** Callback-from-CCS ******/
 
index e0fd35d104bc978f63f1be2a603444fe859e5e19..79f387cd56490b5a03883f5fcd6b29707577fb6c 100644 (file)
@@ -254,12 +254,7 @@ class CkCallbackResumeThread : public CkCallback {
                :CkCallback(resumeThread) { result = NULL; }
        CkCallbackResumeThread(void * &ptr)
            :CkCallback(resumeThread) { result = &ptr; }
-       ~CkCallbackResumeThread(void) {
-           void * res = thread_delay(); //<- block thread here if it hasn't already
-           if (result != NULL) *result = res;
-           else CkFreeMsg(res);
-           thread_destroy();
-       }
+        ~CkCallbackResumeThread(void);
 };
 
 void _registerCkCallback(void); //used by init