/**
* @file CM_MultiThread_Priority.h
* @brief 实现了线程操作的的封装
* @author GT-BU
* @date 2021.02.01
* @version V1.1
* @copyright TCT
* @par 修改日志
* <table>
* <tr><th>Date        <th>Version  <th>Author     <th>Description
* <tr><td>2017.12.20  <td>V1.0     <td>MSCP项目组 <td>创建初始版本
* <tr><td>2021.02.01  <td>V1.1     <td>GT-BU      <td>TSCP项目集成、更新
* </table>
*/
#ifndef CM_MULTITHREAD_PRIORITY_H
#define CM_MULTITHREAD_PRIORITY_H

#include "CM_Types.h"

#ifdef __cplusplus
extern "C"
{
#endif /**< __cplusplus */

    /** 线程优先级定义 */
#ifdef WIN32
#define CM_TASK_PRIORITY_0 (THREAD_PRIORITY_HIGHEST)
#define CM_TASK_PRIORITY_1 (THREAD_PRIORITY_HIGHEST)
#define CM_TASK_PRIORITY_2 (THREAD_PRIORITY_HIGHEST)
#define CM_TASK_PRIORITY_3 (THREAD_PRIORITY_HIGHEST)
#define CM_TASK_PRIORITY_4 (THREAD_PRIORITY_HIGHEST)
#define CM_TASK_PRIORITY_5 (THREAD_PRIORITY_HIGHEST)
#define CM_TASK_PRIORITY_6 (THREAD_PRIORITY_HIGHEST)
#define CM_TASK_PRIORITY_7 (THREAD_PRIORITY_HIGHEST)
#define CM_TASK_PRIORITY_8 (THREAD_PRIORITY_HIGHEST)
#define CM_TASK_PRIORITY_9 (THREAD_PRIORITY_HIGHEST)
#define CM_TASK_PRIORITY_10 (THREAD_PRIORITY_HIGHEST)
#define CM_TASK_PRIORITY_11 (THREAD_PRIORITY_HIGHEST)
#define CM_TASK_PRIORITY_12 (THREAD_PRIORITY_HIGHEST)
#define CM_TASK_PRIORITY_13 (THREAD_PRIORITY_HIGHEST)
#define CM_TASK_PRIORITY_14 (THREAD_PRIORITY_HIGHEST)
#define CM_TASK_PRIORITY_15 (THREAD_PRIORITY_HIGHEST)
#define CM_TASK_PRIORITY_16 (THREAD_PRIORITY_HIGHEST)
#define CM_TASK_PRIORITY_17 (THREAD_PRIORITY_HIGHEST)
#define CM_TASK_PRIORITY_18 (THREAD_PRIORITY_HIGHEST)
#define CM_TASK_PRIORITY_19 (THREAD_PRIORITY_HIGHEST)
#define CM_TASK_PRIORITY_20 (THREAD_PRIORITY_HIGHEST)
#define CM_TASK_PRIORITY_21 (THREAD_PRIORITY_HIGHEST)
#define CM_TASK_PRIORITY_22 (THREAD_PRIORITY_HIGHEST)
#define CM_TASK_PRIORITY_23 (THREAD_PRIORITY_HIGHEST)
#define CM_TASK_PRIORITY_24 (THREAD_PRIORITY_HIGHEST)
#define CM_TASK_PRIORITY_25 (THREAD_PRIORITY_HIGHEST)
#define CM_TASK_PRIORITY_26 (THREAD_PRIORITY_HIGHEST)
#define CM_TASK_PRIORITY_27 (THREAD_PRIORITY_HIGHEST)
#define CM_TASK_PRIORITY_28 (THREAD_PRIORITY_HIGHEST)
#define CM_TASK_PRIORITY_29 (THREAD_PRIORITY_HIGHEST)
#define CM_TASK_PRIORITY_30 (THREAD_PRIORITY_ABOVE_NORMAL)
#define CM_TASK_PRIORITY_31 (THREAD_PRIORITY_ABOVE_NORMAL)
#define CM_TASK_PRIORITY_32 (THREAD_PRIORITY_ABOVE_NORMAL)
#define CM_TASK_PRIORITY_33 (THREAD_PRIORITY_ABOVE_NORMAL)
#define CM_TASK_PRIORITY_34 (THREAD_PRIORITY_ABOVE_NORMAL)
#define CM_TASK_PRIORITY_35 (THREAD_PRIORITY_ABOVE_NORMAL)
#define CM_TASK_PRIORITY_36 (THREAD_PRIORITY_ABOVE_NORMAL)
#define CM_TASK_PRIORITY_37 (THREAD_PRIORITY_ABOVE_NORMAL)
#define CM_TASK_PRIORITY_38 (THREAD_PRIORITY_ABOVE_NORMAL)
#define CM_TASK_PRIORITY_39 (THREAD_PRIORITY_ABOVE_NORMAL)
#define CM_TASK_PRIORITY_40 (THREAD_PRIORITY_ABOVE_NORMAL)
#define CM_TASK_PRIORITY_41 (THREAD_PRIORITY_ABOVE_NORMAL)
#define CM_TASK_PRIORITY_42 (THREAD_PRIORITY_ABOVE_NORMAL)
#define CM_TASK_PRIORITY_43 (THREAD_PRIORITY_ABOVE_NORMAL)
#define CM_TASK_PRIORITY_44 (THREAD_PRIORITY_ABOVE_NORMAL)
#define CM_TASK_PRIORITY_45 (THREAD_PRIORITY_ABOVE_NORMAL)
#define CM_TASK_PRIORITY_46 (THREAD_PRIORITY_ABOVE_NORMAL)
#define CM_TASK_PRIORITY_47 (THREAD_PRIORITY_ABOVE_NORMAL)
#define CM_TASK_PRIORITY_48 (THREAD_PRIORITY_ABOVE_NORMAL)
#define CM_TASK_PRIORITY_49 (THREAD_PRIORITY_ABOVE_NORMAL)
#define CM_TASK_PRIORITY_50 (THREAD_PRIORITY_ABOVE_NORMAL)
#define CM_TASK_PRIORITY_51 (THREAD_PRIORITY_ABOVE_NORMAL)
#define CM_TASK_PRIORITY_52 (THREAD_PRIORITY_ABOVE_NORMAL)
#define CM_TASK_PRIORITY_53 (THREAD_PRIORITY_ABOVE_NORMAL)
#define CM_TASK_PRIORITY_54 (THREAD_PRIORITY_ABOVE_NORMAL)
#define CM_TASK_PRIORITY_55 (THREAD_PRIORITY_ABOVE_NORMAL)
#define CM_TASK_PRIORITY_56 (THREAD_PRIORITY_ABOVE_NORMAL)
#define CM_TASK_PRIORITY_57 (THREAD_PRIORITY_ABOVE_NORMAL)
#define CM_TASK_PRIORITY_58 (THREAD_PRIORITY_ABOVE_NORMAL)
#define CM_TASK_PRIORITY_59 (THREAD_PRIORITY_ABOVE_NORMAL)
#define CM_TASK_PRIORITY_60 (THREAD_PRIORITY_NORMAL)
#define CM_TASK_PRIORITY_61 (THREAD_PRIORITY_NORMAL)
#define CM_TASK_PRIORITY_62 (THREAD_PRIORITY_NORMAL)
#define CM_TASK_PRIORITY_63 (THREAD_PRIORITY_NORMAL)
#define CM_TASK_PRIORITY_64 (THREAD_PRIORITY_NORMAL)
#define CM_TASK_PRIORITY_65 (THREAD_PRIORITY_NORMAL)
#define CM_TASK_PRIORITY_66 (THREAD_PRIORITY_NORMAL)
#define CM_TASK_PRIORITY_67 (THREAD_PRIORITY_NORMAL)
#define CM_TASK_PRIORITY_68 (THREAD_PRIORITY_NORMAL)
#define CM_TASK_PRIORITY_69 (THREAD_PRIORITY_NORMAL)
#define CM_TASK_PRIORITY_70 (THREAD_PRIORITY_NORMAL)
#define CM_TASK_PRIORITY_71 (THREAD_PRIORITY_BELOW_NORMAL)
#define CM_TASK_PRIORITY_72 (THREAD_PRIORITY_BELOW_NORMAL)
#define CM_TASK_PRIORITY_73 (THREAD_PRIORITY_BELOW_NORMAL)
#define CM_TASK_PRIORITY_74 (THREAD_PRIORITY_BELOW_NORMAL)
#define CM_TASK_PRIORITY_75 (THREAD_PRIORITY_BELOW_NORMAL)
#define CM_TASK_PRIORITY_76 (THREAD_PRIORITY_BELOW_NORMAL)
#define CM_TASK_PRIORITY_77 (THREAD_PRIORITY_BELOW_NORMAL)
#define CM_TASK_PRIORITY_78 (THREAD_PRIORITY_BELOW_NORMAL)
#define CM_TASK_PRIORITY_79 (THREAD_PRIORITY_BELOW_NORMAL)
#define CM_TASK_PRIORITY_80 (THREAD_PRIORITY_LOWEST)
#define CM_TASK_PRIORITY_81 (THREAD_PRIORITY_LOWEST)
#define CM_TASK_PRIORITY_82 (THREAD_PRIORITY_LOWEST)
#define CM_TASK_PRIORITY_83 (THREAD_PRIORITY_LOWEST)
#define CM_TASK_PRIORITY_84 (THREAD_PRIORITY_LOWEST)
#define CM_TASK_PRIORITY_85 (THREAD_PRIORITY_LOWEST)
#define CM_TASK_PRIORITY_86 (THREAD_PRIORITY_LOWEST)
#define CM_TASK_PRIORITY_87 (THREAD_PRIORITY_LOWEST)
#define CM_TASK_PRIORITY_88 (THREAD_PRIORITY_LOWEST)
#define CM_TASK_PRIORITY_89 (THREAD_PRIORITY_LOWEST)
#define CM_TASK_PRIORITY_90 (THREAD_PRIORITY_IDLE)
#define CM_TASK_PRIORITY_91 (THREAD_PRIORITY_IDLE)
#define CM_TASK_PRIORITY_92 (THREAD_PRIORITY_IDLE)
#define CM_TASK_PRIORITY_93 (THREAD_PRIORITY_IDLE)
#define CM_TASK_PRIORITY_94 (THREAD_PRIORITY_IDLE)
#define CM_TASK_PRIORITY_95 (THREAD_PRIORITY_IDLE)
#define CM_TASK_PRIORITY_96 (THREAD_PRIORITY_IDLE)
#define CM_TASK_PRIORITY_97 (THREAD_PRIORITY_IDLE)
#define CM_TASK_PRIORITY_98 (THREAD_PRIORITY_IDLE)
#define CM_TASK_PRIORITY_99 (THREAD_PRIORITY_IDLE)
#endif

#ifdef QNX
#define CM_TASK_PRIORITY_0 63
#define CM_TASK_PRIORITY_1 63
#define CM_TASK_PRIORITY_2 63
#define CM_TASK_PRIORITY_3 63
#define CM_TASK_PRIORITY_4 63
#define CM_TASK_PRIORITY_5 63
#define CM_TASK_PRIORITY_6 63
#define CM_TASK_PRIORITY_7 63
#define CM_TASK_PRIORITY_8 63
#define CM_TASK_PRIORITY_9 63
#define CM_TASK_PRIORITY_10 63
#define CM_TASK_PRIORITY_11 63
#define CM_TASK_PRIORITY_12 63
#define CM_TASK_PRIORITY_13 63
#define CM_TASK_PRIORITY_14 63
#define CM_TASK_PRIORITY_15 63
#define CM_TASK_PRIORITY_16 63
#define CM_TASK_PRIORITY_17 63
#define CM_TASK_PRIORITY_18 63
#define CM_TASK_PRIORITY_19 63
#define CM_TASK_PRIORITY_20 63
#define CM_TASK_PRIORITY_21 63
#define CM_TASK_PRIORITY_22 63
#define CM_TASK_PRIORITY_23 63
#define CM_TASK_PRIORITY_24 63
#define CM_TASK_PRIORITY_25 63
#define CM_TASK_PRIORITY_26 63
#define CM_TASK_PRIORITY_27 63
#define CM_TASK_PRIORITY_28 63
#define CM_TASK_PRIORITY_29 63
#define CM_TASK_PRIORITY_30 63
#define CM_TASK_PRIORITY_31 63
#define CM_TASK_PRIORITY_32 63
#define CM_TASK_PRIORITY_33 63
#define CM_TASK_PRIORITY_34 63
#define CM_TASK_PRIORITY_35 63
#define CM_TASK_PRIORITY_36 63
#define CM_TASK_PRIORITY_37 62
#define CM_TASK_PRIORITY_38 61
#define CM_TASK_PRIORITY_39 60
#define CM_TASK_PRIORITY_40 59
#define CM_TASK_PRIORITY_41 58
#define CM_TASK_PRIORITY_42 57
#define CM_TASK_PRIORITY_43 56
#define CM_TASK_PRIORITY_44 55
#define CM_TASK_PRIORITY_45 54
#define CM_TASK_PRIORITY_46 53
#define CM_TASK_PRIORITY_47 52
#define CM_TASK_PRIORITY_48 51
#define CM_TASK_PRIORITY_49 50
#define CM_TASK_PRIORITY_50 49
#define CM_TASK_PRIORITY_51 48
#define CM_TASK_PRIORITY_52 47
#define CM_TASK_PRIORITY_53 46
#define CM_TASK_PRIORITY_54 45
#define CM_TASK_PRIORITY_55 44
#define CM_TASK_PRIORITY_56 43
#define CM_TASK_PRIORITY_57 42
#define CM_TASK_PRIORITY_58 41
#define CM_TASK_PRIORITY_59 40
#define CM_TASK_PRIORITY_60 39
#define CM_TASK_PRIORITY_61 38
#define CM_TASK_PRIORITY_62 37
#define CM_TASK_PRIORITY_63 36
#define CM_TASK_PRIORITY_64 35
#define CM_TASK_PRIORITY_65 34
#define CM_TASK_PRIORITY_66 33
#define CM_TASK_PRIORITY_67 32
#define CM_TASK_PRIORITY_68 31
#define CM_TASK_PRIORITY_69 30
#define CM_TASK_PRIORITY_70 29
#define CM_TASK_PRIORITY_71 28
#define CM_TASK_PRIORITY_72 27
#define CM_TASK_PRIORITY_73 26
#define CM_TASK_PRIORITY_74 25
#define CM_TASK_PRIORITY_75 24
#define CM_TASK_PRIORITY_76 23
#define CM_TASK_PRIORITY_77 22
#define CM_TASK_PRIORITY_78 21
#define CM_TASK_PRIORITY_79 20
#define CM_TASK_PRIORITY_80 19
#define CM_TASK_PRIORITY_81 18
#define CM_TASK_PRIORITY_82 17
#define CM_TASK_PRIORITY_83 16
#define CM_TASK_PRIORITY_84 15
#define CM_TASK_PRIORITY_85 14
#define CM_TASK_PRIORITY_86 13
#define CM_TASK_PRIORITY_87 12
#define CM_TASK_PRIORITY_88 11
#define CM_TASK_PRIORITY_89 10
#define CM_TASK_PRIORITY_90 9
#define CM_TASK_PRIORITY_91 8
#define CM_TASK_PRIORITY_92 7
#define CM_TASK_PRIORITY_93 6
#define CM_TASK_PRIORITY_94 5
#define CM_TASK_PRIORITY_95 4
#define CM_TASK_PRIORITY_96 3
#define CM_TASK_PRIORITY_97 2
#define CM_TASK_PRIORITY_98 1
#define CM_TASK_PRIORITY_99 0
#endif					    

#ifdef VXWORKS			    
#define CM_TASK_PRIORITY_0 0
#define CM_TASK_PRIORITY_1 1
#define CM_TASK_PRIORITY_2 2
#define CM_TASK_PRIORITY_3 3
#define CM_TASK_PRIORITY_4 4
#define CM_TASK_PRIORITY_5 5
#define CM_TASK_PRIORITY_6 6
#define CM_TASK_PRIORITY_7 7
#define CM_TASK_PRIORITY_8 8
#define CM_TASK_PRIORITY_9 9
#define CM_TASK_PRIORITY_10 10
#define CM_TASK_PRIORITY_11 11
#define CM_TASK_PRIORITY_12 12
#define CM_TASK_PRIORITY_13 13
#define CM_TASK_PRIORITY_14 14
#define CM_TASK_PRIORITY_15 15
#define CM_TASK_PRIORITY_16 16
#define CM_TASK_PRIORITY_17 17
#define CM_TASK_PRIORITY_18 18
#define CM_TASK_PRIORITY_19 19
#define CM_TASK_PRIORITY_20 20
#define CM_TASK_PRIORITY_21 21
#define CM_TASK_PRIORITY_22 22
#define CM_TASK_PRIORITY_23 23
#define CM_TASK_PRIORITY_24 24
#define CM_TASK_PRIORITY_25 25
#define CM_TASK_PRIORITY_26 26
#define CM_TASK_PRIORITY_27 27
#define CM_TASK_PRIORITY_28 28
#define CM_TASK_PRIORITY_29 29
#define CM_TASK_PRIORITY_30 30
#define CM_TASK_PRIORITY_31 31
#define CM_TASK_PRIORITY_32 32
#define CM_TASK_PRIORITY_33 33
#define CM_TASK_PRIORITY_34 34
#define CM_TASK_PRIORITY_35 35
#define CM_TASK_PRIORITY_36 36
#define CM_TASK_PRIORITY_37 37
#define CM_TASK_PRIORITY_38 38
#define CM_TASK_PRIORITY_39 39
#define CM_TASK_PRIORITY_40 40
#define CM_TASK_PRIORITY_41 41
#define CM_TASK_PRIORITY_42 42
#define CM_TASK_PRIORITY_43 43
#define CM_TASK_PRIORITY_44 44
#define CM_TASK_PRIORITY_45 45
#define CM_TASK_PRIORITY_46 46
#define CM_TASK_PRIORITY_47 47
#define CM_TASK_PRIORITY_48 48
#define CM_TASK_PRIORITY_49 49
#define CM_TASK_PRIORITY_50 50
#define CM_TASK_PRIORITY_51 51
#define CM_TASK_PRIORITY_52 52
#define CM_TASK_PRIORITY_53 53
#define CM_TASK_PRIORITY_54 54
#define CM_TASK_PRIORITY_55 55
#define CM_TASK_PRIORITY_56 56
#define CM_TASK_PRIORITY_57 57
#define CM_TASK_PRIORITY_58 58
#define CM_TASK_PRIORITY_59 59
#define CM_TASK_PRIORITY_60 60
#define CM_TASK_PRIORITY_61 61
#define CM_TASK_PRIORITY_62 62
#define CM_TASK_PRIORITY_63 63
#define CM_TASK_PRIORITY_64 64
#define CM_TASK_PRIORITY_65 65
#define CM_TASK_PRIORITY_66 66
#define CM_TASK_PRIORITY_67 67
#define CM_TASK_PRIORITY_68 68
#define CM_TASK_PRIORITY_69 69
#define CM_TASK_PRIORITY_70 70
#define CM_TASK_PRIORITY_71 71
#define CM_TASK_PRIORITY_72 72
#define CM_TASK_PRIORITY_73 73
#define CM_TASK_PRIORITY_74 74
#define CM_TASK_PRIORITY_75 75
#define CM_TASK_PRIORITY_76 76
#define CM_TASK_PRIORITY_77 77
#define CM_TASK_PRIORITY_78 78
#define CM_TASK_PRIORITY_79 79
#define CM_TASK_PRIORITY_80 80
#define CM_TASK_PRIORITY_81 81
#define CM_TASK_PRIORITY_82 82
#define CM_TASK_PRIORITY_83 83
#define CM_TASK_PRIORITY_84 84
#define CM_TASK_PRIORITY_85 85
#define CM_TASK_PRIORITY_86 86
#define CM_TASK_PRIORITY_87 87
#define CM_TASK_PRIORITY_88 88
#define CM_TASK_PRIORITY_89 89
#define CM_TASK_PRIORITY_90 90
#define CM_TASK_PRIORITY_91 91
#define CM_TASK_PRIORITY_92 92
#define CM_TASK_PRIORITY_93 93
#define CM_TASK_PRIORITY_94 94
#define CM_TASK_PRIORITY_95 95
#define CM_TASK_PRIORITY_96 96
#define CM_TASK_PRIORITY_97 97
#define CM_TASK_PRIORITY_98 98
#define CM_TASK_PRIORITY_99 99
#endif

#ifdef __cplusplus
}

#endif /**< __cplusplus */

#endif /**< _CM_MULTITHREAD_PRIORITY_H */

