1 /* 2 * Copyright (c) 2022 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 16 /* This files contains c performance_constructor header modules. */ 17 18 #ifndef MULTITHREAD_CONSTRUCTOR_H 19 #define MULTITHREAD_CONSTRUCTOR_H 20 21 #define NOINLINE __attribute__((noinline)) 22 23 #define GEN_TEST_FUNCTION(FuncNumA, FuncNumB) \ 24 __attribute__((noinline)) int TestFunc##FuncNumA() \ 25 { \ 26 return TestFunc##FuncNumB(); \ 27 } 28 29 void CreateThread(int *argv); 30 31 #ifdef __cplusplus 32 extern "C" { 33 #endif 34 int MultiThreadConstructor(const int threadNum); 35 #ifdef __cplusplus 36 } 37 #endif 38 39 // test functions for callstack depth test 40 int TestFunc0(void); 41 int TestFunc1(void); 42 int TestFunc2(void); 43 int TestFunc3(void); 44 int TestFunc4(void); 45 int TestFunc5(void); 46 int TestFunc6(void); 47 int TestFunc7(void); 48 int TestFunc8(void); 49 int TestFunc9(void); 50 int TestFunc10(void); 51 int TestFunc11(void); 52 int TestFunc12(void); 53 int TestFunc13(void); 54 int TestFunc14(void); 55 int TestFunc15(void); 56 int TestFunc16(void); 57 int TestFunc17(void); 58 int TestFunc18(void); 59 int TestFunc19(void); 60 int TestFunc20(void); 61 int TestFunc21(void); 62 int TestFunc22(void); 63 int TestFunc23(void); 64 int TestFunc24(void); 65 int TestFunc25(void); 66 int TestFunc26(void); 67 int TestFunc27(void); 68 int TestFunc28(void); 69 int TestFunc29(void); 70 int TestFunc30(void); 71 int TestFunc31(void); 72 int TestFunc32(void); 73 int TestFunc33(void); 74 int TestFunc34(void); 75 int TestFunc35(void); 76 int TestFunc36(void); 77 int TestFunc37(void); 78 int TestFunc38(void); 79 int TestFunc39(void); 80 int TestFunc40(void); 81 int TestFunc41(void); 82 int TestFunc42(void); 83 int TestFunc43(void); 84 int TestFunc44(void); 85 int TestFunc45(void); 86 int TestFunc46(void); 87 int TestFunc47(void); 88 int TestFunc48(void); 89 int TestFunc49(void); 90 int TestFunc50(void); 91 int TestFunc51(void); 92 int TestFunc52(void); 93 int TestFunc53(void); 94 int TestFunc54(void); 95 int TestFunc55(void); 96 int TestFunc56(void); 97 int TestFunc57(void); 98 int TestFunc58(void); 99 int TestFunc59(void); 100 int TestFunc60(void); 101 int TestFunc61(void); 102 int TestFunc62(void); 103 int TestFunc63(void); 104 int TestFunc64(void); 105 int TestFunc65(void); 106 int TestFunc66(void); 107 int TestFunc67(void); 108 int TestFunc68(void); 109 int TestFunc69(void); 110 int TestFunc70(void); 111 112 #endif // MULTITHREAD_CONSTRUCTOR_H 113