2018-05-22 17:23:39 +02:00
|
|
|
/*
|
2021-05-16 20:51:16 +02:00
|
|
|
* Copyright (C) 2020-2021 Intel Corporation
|
2018-05-22 17:23:39 +02:00
|
|
|
*
|
2018-09-18 09:11:08 +02:00
|
|
|
* SPDX-License-Identifier: MIT
|
2018-05-22 17:23:39 +02:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
#include <memory>
|
2019-03-26 11:59:46 +01:00
|
|
|
namespace NEO {
|
2018-05-22 17:23:39 +02:00
|
|
|
|
|
|
|
class Thread {
|
|
|
|
public:
|
|
|
|
static std::unique_ptr<Thread> create(void *(*func)(void *), void *arg);
|
|
|
|
virtual void join() = 0;
|
|
|
|
virtual ~Thread() = default;
|
2021-04-20 12:20:21 +00:00
|
|
|
virtual void yield() = 0;
|
2018-05-22 17:23:39 +02:00
|
|
|
};
|
2019-03-26 11:59:46 +01:00
|
|
|
} // namespace NEO
|