mirror of https://github.com/BOINC/boinc.git
- API: Remove exception trapping stuff from the
boinc_get_opencl_ids. api/ boinc_opencl.cpp svn path=/trunk/boinc/; revision=24552
This commit is contained in:
parent
0a180ee3f8
commit
7c88969aa9
|
@ -26,26 +26,14 @@
|
|||
|
||||
#ifdef _WIN32
|
||||
#include "win_util.h"
|
||||
#else
|
||||
#include <setjmp.h>
|
||||
#include <signal.h>
|
||||
#endif
|
||||
#include <string>
|
||||
|
||||
#include "error_numbers.h"
|
||||
#include "boinc_api.h"
|
||||
|
||||
#include "coproc.h"
|
||||
|
||||
#include "boinc_opencl.h"
|
||||
|
||||
#ifndef _WIN32
|
||||
static jmp_buf resume;
|
||||
static void segv_handler(int) {
|
||||
longjmp(resume, 1);
|
||||
}
|
||||
#endif
|
||||
|
||||
// returns an OpenCL error num or zero
|
||||
//
|
||||
int boinc_get_opencl_ids_aux(
|
||||
|
@ -120,27 +108,9 @@ int boinc_get_opencl_ids(cl_device_id* device, cl_platform_id* platform) {
|
|||
return ERR_NOT_FOUND;
|
||||
}
|
||||
|
||||
#ifdef _WIN32
|
||||
try {
|
||||
retval = boinc_get_opencl_ids_aux(
|
||||
aid.gpu_type, aid.gpu_device_num, device, platform
|
||||
);
|
||||
}
|
||||
catch (...) {
|
||||
return ERR_SIGNAL_CATCH;
|
||||
}
|
||||
#else
|
||||
void (*old_sig)(int) = signal(SIGSEGV, segv_handler);
|
||||
if (setjmp(resume)) {
|
||||
return ERR_SIGNAL_CATCH;
|
||||
} else {
|
||||
retval = boinc_get_opencl_ids_aux(
|
||||
aid.gpu_type, aid.gpu_device_num, device, platform
|
||||
);
|
||||
}
|
||||
retval = boinc_get_opencl_ids_aux(
|
||||
aid.gpu_type, aid.gpu_device_num, device, platform
|
||||
);
|
||||
|
||||
signal(SIGSEGV, old_sig);
|
||||
#endif
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
|
|
@ -8245,3 +8245,10 @@ Charlie 8 Nov 2011
|
|||
|
||||
mac_installer/
|
||||
PostInstall.cpp
|
||||
|
||||
Rom 8 Nov 2011
|
||||
- API: Remove exception trapping stuff from the
|
||||
boinc_get_opencl_ids.
|
||||
|
||||
api/
|
||||
boinc_opencl.cpp
|
||||
|
|
Loading…
Reference in New Issue