Line data Source code
1 : /**
2 : * Copyright (c) 2025 Huawei Technologies Co., Ltd.
3 : * This program is free software, you can redistribute it and/or modify it under the terms and conditions of
4 : * CANN Open Software License Agreement Version 2.0 (the "License").
5 : * Please refer to the License for details. You may not use this file except in compliance with the License.
6 : * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED,
7 : * INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
8 : * See LICENSE in the root of the software repository for the full text of the License.
9 : */
10 : #include "awatchdog.h"
11 :
12 1 : AwdHandle AwdCreateThreadWatchdog(uint32_t dogId, uint32_t timeout, AwatchdogCallbackFunc callback)
13 : {
14 : (void)dogId;
15 : (void)timeout;
16 : (void)callback;
17 1 : return AWD_INVALID_HANDLE;
18 : }
19 :
20 2 : void AwdDestroyThreadWatchdog(AwdHandle handle)
21 : {
22 2 : if (handle == AWD_INVALID_HANDLE) {
23 1 : return;
24 : }
25 1 : AwdThreadWatchdog *dog = (AwdThreadWatchdog *)handle;
26 1 : AWD_ATOMIC_TEST_AND_SET(&dog->startCount, AWD_STATUS_DESTROYED);
27 : }
|