Refactor deducing blocked state and task level.

- Do this with one helper function.

Change-Id: I81dd3107a98db7e45a691ba6d5e708d98eabe3d2
This commit is contained in:
Mrozek, Michal
2017-12-22 16:05:10 +01:00
parent ec59a900e1
commit a8b91c8c99
6 changed files with 27 additions and 29 deletions

View File

@ -149,11 +149,10 @@ class Event : public BaseObject<_cl_event>, public IDNode<Event> {
static cl_int waitForEvents(cl_uint numEvents,
const cl_event *eventList);
std::unique_ptr<Command> setCommand(std::unique_ptr<Command> newCmd) {
void setCommand(std::unique_ptr<Command> newCmd) {
UNRECOVERABLE_IF(cmdToSubmit.load());
cmdToSubmit.exchange(newCmd.release());
eventWithoutCommand = false;
return nullptr;
}
Command *peekCommand() {
return cmdToSubmit;