• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2023 Huawei Device Co., Ltd.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  * http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 #ifndef TASK_ATTR_PRIVATE_H
16 #define TASK_ATTR_PRIVATE_H
17 #include <string>
18 #include "c/type_def.h"
19 #include "cpp/task.h"
20 #include "qos.h"
21 
22 namespace ffrt {
23 class task_attr_private {
24 public:
task_attr_private()25     task_attr_private()
26         : qos_map(static_cast<int>(qos_default))
27     {
28     }
29 
task_attr_private(const task_attr attr)30     explicit task_attr_private(const task_attr attr)
31         : qos_map(attr.qos()),
32           name_(attr.name()),
33           delay_(attr.delay())
34     {
35     }
36 
37     QoSMap qos_map;
38     std::string name_;
39     uint64_t delay_ = 0;
40     uint64_t timeout_ = 0;
41     ffrt_function_header_t* timeoutCb_ = nullptr;
42 };
43 }
44 #endif
45