aboutsummaryrefslogtreecommitdiff
path: root/src/core/dsp
diff options
context:
space:
mode:
authorGil Pitney <gil.pitney@linaro.org>2015-04-15 21:34:35 +0000
committerGil Pitney <gil.pitney@linaro.org>2015-04-15 21:34:35 +0000
commit51150d2126883d0d02af35473d408149c652afeb (patch)
tree5da90fdfd592b6ae914c7ca4cbc8af3c541bd6d3 /src/core/dsp
parent11c6ffa910c4b93da8ba1cf1f1ca5e2773266fba (diff)
Change Event Status type from enum to int to allow portable negative numbers
The C++ standard says the result of assigning negative values to an enum of positive values is compiler dependent. Since event objects can have negative status (indicating abnormal termination), this commit explicitly promotes the Status type to int. Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
Diffstat (limited to 'src/core/dsp')
-rw-r--r--src/core/dsp/worker.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/dsp/worker.cpp b/src/core/dsp/worker.cpp
index 79223f0..ace3eec 100644
--- a/src/core/dsp/worker.cpp
+++ b/src/core/dsp/worker.cpp
@@ -82,7 +82,7 @@ void handle_event_completion(DSPDevice *device)
// an event may be released once it is Complete
if (queue_props & CL_QUEUE_PROFILING_ENABLE)
event->updateTiming(Event::End);
- event->setStatus(Event::Complete);
+ event->setStatus(CL_COMPLETE);
}
@@ -491,7 +491,7 @@ bool handle_event_dispatch(DSPDevice *device)
// an event may be released once it is Complete
if (queue_props & CL_QUEUE_PROFILING_ENABLE)
event->updateTiming(Event::End);
- event->setStatus((errcode == CL_SUCCESS) ? Event::Complete :
+ event->setStatus((errcode == CL_SUCCESS) ? CL_COMPLETE :
(Event::Status)errcode);
return false;