Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
f60f1458
X
Xts Acts
项目概览
OpenHarmony
/
Xts Acts
大约 1 年 前同步成功
通知
9
Star
22
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
X
Xts Acts
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
f60f1458
编写于
8月 21, 2023
作者:
W
wangyulie
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
删除lock文件,黄区同步会编译报错
Signed-off-by:
N
wangyulie
<
wanglieyu@126.com
>
上级
3b14b191
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
12 addition
and
39 deletion
+12
-39
resourceschedule/resourceschedule_standard/ffrt/entry/src/main/cpp/ffrtndk.cpp
...urceschedule_standard/ffrt/entry/src/main/cpp/ffrtndk.cpp
+12
-12
resourceschedule/resourceschedule_standard/ffrt/oh-package-lock.json5
...dule/resourceschedule_standard/ffrt/oh-package-lock.json5
+0
-27
未找到文件。
resourceschedule/resourceschedule_standard/ffrt/entry/src/main/cpp/ffrtndk.cpp
浏览文件 @
f60f1458
...
...
@@ -158,16 +158,16 @@ static inline ffrt_function_header_t* ffrt_create_function_wrapper(const ffrt_fu
return
(
ffrt_function_header_t
*
)
f
;
}
static
inline
void
ffrt_submit_c
(
ffrt_function_t
func
,
const
ffrt_function_t
after_func
,
void
*
arg
,
const
ffrt_deps_t
*
in_deps
,
const
ffrt_deps_t
*
out_deps
,
const
ffrt_task_attr_t
*
attr
)
static
inline
void
ffrt_submit_c
(
ffrt_function_t
func
,
void
*
arg
,
const
ffrt_deps_t
*
in_deps
,
const
ffrt_deps_t
*
out_deps
,
const
ffrt_task_attr_t
*
attr
)
{
ffrt_submit_base
(
ffrt_create_function_wrapper
(
func
,
after_func
,
arg
),
in_deps
,
out_deps
,
attr
);
ffrt_submit_base
(
ffrt_create_function_wrapper
(
func
,
NULL
,
arg
),
in_deps
,
out_deps
,
attr
);
}
static
inline
ffrt_task_handle_t
ffrt_submit_h_c
(
ffrt_function_t
func
,
const
ffrt_function_t
after_func
,
void
*
arg
,
const
ffrt_deps_t
*
in_deps
,
const
ffrt_deps_t
*
out_deps
,
const
ffrt_task_attr_t
*
attr
)
static
inline
ffrt_task_handle_t
ffrt_submit_h_c
(
ffrt_function_t
func
,
void
*
arg
,
const
ffrt_deps_t
*
in_deps
,
const
ffrt_deps_t
*
out_deps
,
const
ffrt_task_attr_t
*
attr
)
{
return
ffrt_submit_h_base
(
ffrt_create_function_wrapper
(
func
,
after_func
,
arg
),
in_deps
,
out_deps
,
attr
);
return
ffrt_submit_h_base
(
ffrt_create_function_wrapper
(
func
,
NULL
,
arg
),
in_deps
,
out_deps
,
attr
);
}
void
FfrtCvTask
(
void
*
arg
)
...
...
@@ -184,9 +184,9 @@ void FfrtCvTask(void* arg)
if
(
ret
!=
ffrt_success
)
{
printf
(
"error
\n
"
);
}
ffrt_submit_c
(
Func1
,
NULL
,
&
t
,
NULL
,
NULL
,
NULL
);
ffrt_submit_c
(
Func2
,
NULL
,
&
t
,
NULL
,
NULL
,
NULL
);
ffrt_submit_c
(
Func3
,
NULL
,
&
t
,
NULL
,
NULL
,
NULL
);
ffrt_submit_c
(
Func1
,
&
t
,
NULL
,
NULL
,
NULL
);
ffrt_submit_c
(
Func2
,
&
t
,
NULL
,
NULL
,
NULL
);
ffrt_submit_c
(
Func3
,
&
t
,
NULL
,
NULL
,
NULL
);
ffrt_wait
();
ffrt_cond_destroy
(
&
cond
);
ffrt_mutex_destroy
(
&
lock_
);
...
...
@@ -206,7 +206,7 @@ static napi_value SubmitSimpleFfrtTask(napi_env env, napi_callback_info info)
OH_LOG_Print
(
LOG_APP
,
LOG_INFO
,
1
,
"testFFRT"
,
"qos is %{public}d"
,
ffrt_task_attr_get_qos
(
&
attr
));
ffrt_task_attr_set_qos
(
&
attr
,
static_cast
<
ffrt_qos_t
>
(
ffrt_qos_user_initiated
));
OH_LOG_Print
(
LOG_APP
,
LOG_INFO
,
1
,
"testFFRT"
,
"qos2 is %{public}d"
,
ffrt_task_attr_get_qos
(
&
attr
));
ffrt_submit_c
(
MyPrint
,
NULL
,
NULL
,
NULL
,
NULL
,
&
attr
);
ffrt_submit_c
(
MyPrint
,
NULL
,
NULL
,
NULL
,
&
attr
);
int
result
=
ffrt_this_task_update_qos
(
static_cast
<
ffrt_qos_t
>
(
ffrt_qos_default
));
OH_LOG_Print
(
LOG_APP
,
LOG_INFO
,
1
,
"testFFRT"
,
"update_qos result is %{public}d"
,
result
);
OH_LOG_Print
(
LOG_APP
,
LOG_INFO
,
1
,
"testFFRT"
,
"qos3 is %{public}d"
,
ffrt_task_attr_get_qos
(
&
attr
));
...
...
@@ -223,8 +223,8 @@ static napi_value SubmitSimpleFfrtTask(napi_env env, napi_callback_info info)
static
napi_value
SubmitCondFfrtTask
(
napi_env
env
,
napi_callback_info
info
)
{
int
a
=
0
;
ffrt_submit_c
(
FfrtCvTask
,
NULL
,
&
a
,
NULL
,
NULL
,
NULL
);
ffrt_task_handle_t
task1
=
ffrt_submit_h_c
(
MyPrint
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
);
ffrt_submit_c
(
FfrtCvTask
,
&
a
,
NULL
,
NULL
,
NULL
);
ffrt_task_handle_t
task1
=
ffrt_submit_h_c
(
MyPrint
,
NULL
,
NULL
,
NULL
,
NULL
);
ffrt_wait_deps
(
nullptr
);
ffrt_wait
();
OH_LOG_Print
(
LOG_APP
,
LOG_INFO
,
1
,
"testFFRT"
,
"cond task a is %{public}d"
,
a
);
...
...
resourceschedule/resourceschedule_standard/ffrt/oh-package-lock.json5
已删除
100644 → 0
浏览文件 @
3b14b191
/*
* Copyright (c) 2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
{
"lockfileVersion": 1,
"ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.",
"specifiers": {
"@ohos/hypium@1.0.6": "@ohos/hypium@1.0.6"
},
"packages": {
"@ohos/hypium@1.0.6": {
"resolved": "https://repo.harmonyos.com/ohpm/@ohos/hypium/-/hypium-1.0.6.tgz",
"integrity": "sha512-bb3DWeWhYrFqj9mPFV3yZQpkm36kbcK+YYaeY9g292QKSjOdmhEIQR2ULPvyMsgSR4usOBf5nnYrDmaCCXirgQ=="
}
}
}
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录