Ken Liu | f39d8eb | 2021-10-07 12:55:33 +0800 | [diff] [blame] | 1 | /* |
2 | * Copyright (c) 2021, Arm Limited. All rights reserved. | ||||
3 | * | ||||
4 | * SPDX-License-Identifier: BSD-3-Clause | ||||
5 | * | ||||
6 | */ | ||||
7 | #ifndef __CURRENT_H__ | ||||
8 | #define __CURRENT_H__ | ||||
9 | |||||
10 | #include "thread.h" | ||||
11 | #include "spm_ipc.h" | ||||
12 | |||||
13 | /* Get current component */ | ||||
14 | #define GET_CURRENT_COMPONENT() GET_CTX_OWNER(CURRENT_THREAD->p_context_ctrl) | ||||
15 | /* Set current component */ | ||||
16 | #define SET_CURRENT_COMPONENT(p) THRD_UPDATE_CUR_CTXCTRL(&(p)->ctx_ctrl) | ||||
17 | |||||
18 | #endif /* __CURRENT_H__ */ |