Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Jerryscript
提交
25cf788d
T
Third Party Jerryscript
项目概览
OpenHarmony
/
Third Party Jerryscript
9 个月 前同步成功
通知
5
Star
19
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
Third Party Jerryscript
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
25cf788d
编写于
7月 22, 2021
作者:
G
Gavin1012
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
suit jerry_dynamic_global_context for simulator <wanggang203@huawei.com>
Signed-off-by:
N
Gavin1012
<
wanggang203@huawei.com
>
上级
7bea0b60
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
11 addition
and
12 deletion
+11
-12
jerry-port/default/default-external-context.c
jerry-port/default/default-external-context.c
+11
-12
未找到文件。
jerry-port/default/default-external-context.c
浏览文件 @
25cf788d
...
...
@@ -16,7 +16,11 @@
#include "jerryscript-port.h"
#include "jerryscript-port-default.h"
#if defined (JERRY_FOR_IAR_CONFIG) && (JERRY_EXTERNAL_CONTEXT == 1)
#if (JERRY_EXTERNAL_CONTEXT == 1)
extern
jerry_context_t
*
jerry_dynamic_global_context_p
;
#if defined (JERRY_FOR_IAR_CONFIG)
#include "generate-bytecode.h"
#include "los_task.h"
...
...
@@ -29,7 +33,6 @@
ContextRecord
g_contextRecords
[
MAX_CONTEXT_NUM
]
=
{
0
};
void
jerry_switch_context
();
extern
jerry_context_t
*
jerry_dynamic_global_context_p
;
/**
* set context function: store task id and context
...
...
@@ -67,13 +70,7 @@ jerry_port_get_current_context (void) /**< points to current task's context */
return
jerry_dynamic_global_context_p
;
}
#else // not defined JERRY_FOR_IAR_CONFIG || not enabled JERRY_EXTERNAL_CONTEXT
/**
* Pointer to the current context.
* Note that it is a global variable, and is not a thread safe implementation.
*/
static
jerry_context_t
*
current_context_p
=
NULL
;
#else // not defined JERRY_FOR_IAR_CONFIG, but enabled JERRY_EXTERNAL_CONTEXT
/**
* Set the current_context_p as the passed pointer.
...
...
@@ -81,7 +78,7 @@ static jerry_context_t *current_context_p = NULL;
void
jerry_port_default_set_current_context
(
jerry_context_t
*
context_p
)
/**< points to the created context */
{
current
_context_p
=
context_p
;
jerry_dynamic_global
_context_p
=
context_p
;
}
/* jerry_port_default_set_current_context */
/**
...
...
@@ -92,7 +89,9 @@ jerry_port_default_set_current_context (jerry_context_t *context_p) /**< points
jerry_context_t
*
jerry_port_get_current_context
(
void
)
{
return
current
_context_p
;
return
jerry_dynamic_global
_context_p
;
}
/* jerry_port_get_current_context */
#endif // defined (JERRY_FOR_IAR_CONFIG) && (JERRY_EXTERNAL_CONTEXT == 1)
#endif // defined (JERRY_FOR_IAR_CONFIG)
#endif // (JERRY_EXTERNAL_CONTEXT == 1)
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录