|
65 | 65 | portRAISE_PRIVILEGE(); |
66 | 66 | portMEMORY_BARRIER(); |
67 | 67 |
|
| 68 | + uxPriority = uxPriority & ~( portPRIVILEGE_BIT ); |
| 69 | + portMEMORY_BARRIER(); |
| 70 | + |
68 | 71 | xReturn = xTaskCreate( pvTaskCode, pcName, usStackDepth, pvParameters, uxPriority, pxCreatedTask ); |
69 | 72 | portMEMORY_BARRIER(); |
70 | 73 |
|
|
97 | 100 | portRAISE_PRIVILEGE(); |
98 | 101 | portMEMORY_BARRIER(); |
99 | 102 |
|
| 103 | + uxPriority = uxPriority & ~( portPRIVILEGE_BIT ); |
| 104 | + portMEMORY_BARRIER(); |
| 105 | + |
100 | 106 | xReturn = xTaskCreateStatic( pxTaskCode, pcName, ulStackDepth, pvParameters, uxPriority, puxStackBuffer, pxTaskBuffer ); |
101 | 107 | portMEMORY_BARRIER(); |
102 | 108 |
|
|
1708 | 1714 | } |
1709 | 1715 | /*-----------------------------------------------------------*/ |
1710 | 1716 |
|
1711 | | - #if ( ( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) && ( configUSE_TIMERS == 1 ) ) |
1712 | | - TimerHandle_t MPU_xTimerCreate( const char * const pcTimerName, |
1713 | | - const TickType_t xTimerPeriodInTicks, |
1714 | | - const UBaseType_t uxAutoReload, |
1715 | | - void * const pvTimerID, |
1716 | | - TimerCallbackFunction_t pxCallbackFunction ) /* FREERTOS_SYSTEM_CALL */ |
1717 | | - { |
1718 | | - TimerHandle_t xReturn; |
1719 | | - |
1720 | | - if( portIS_PRIVILEGED() == pdFALSE ) |
1721 | | - { |
1722 | | - portRAISE_PRIVILEGE(); |
1723 | | - portMEMORY_BARRIER(); |
1724 | | - |
1725 | | - xReturn = xTimerCreate( pcTimerName, xTimerPeriodInTicks, uxAutoReload, pvTimerID, pxCallbackFunction ); |
1726 | | - portMEMORY_BARRIER(); |
1727 | | - |
1728 | | - portRESET_PRIVILEGE(); |
1729 | | - portMEMORY_BARRIER(); |
1730 | | - } |
1731 | | - else |
1732 | | - { |
1733 | | - xReturn = xTimerCreate( pcTimerName, xTimerPeriodInTicks, uxAutoReload, pvTimerID, pxCallbackFunction ); |
1734 | | - } |
1735 | | - |
1736 | | - return xReturn; |
1737 | | - } |
1738 | | - #endif /* if ( ( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) && ( configUSE_TIMERS == 1 ) ) */ |
1739 | | -/*-----------------------------------------------------------*/ |
1740 | | - |
1741 | | - #if ( ( configSUPPORT_STATIC_ALLOCATION == 1 ) && ( configUSE_TIMERS == 1 ) ) |
1742 | | - TimerHandle_t MPU_xTimerCreateStatic( const char * const pcTimerName, |
1743 | | - const TickType_t xTimerPeriodInTicks, |
1744 | | - const UBaseType_t uxAutoReload, |
1745 | | - void * const pvTimerID, |
1746 | | - TimerCallbackFunction_t pxCallbackFunction, |
1747 | | - StaticTimer_t * pxTimerBuffer ) /* FREERTOS_SYSTEM_CALL */ |
1748 | | - { |
1749 | | - TimerHandle_t xReturn; |
1750 | | - |
1751 | | - if( portIS_PRIVILEGED() == pdFALSE ) |
1752 | | - { |
1753 | | - portRAISE_PRIVILEGE(); |
1754 | | - portMEMORY_BARRIER(); |
1755 | | - |
1756 | | - xReturn = xTimerCreateStatic( pcTimerName, xTimerPeriodInTicks, uxAutoReload, pvTimerID, pxCallbackFunction, pxTimerBuffer ); |
1757 | | - portMEMORY_BARRIER(); |
1758 | | - |
1759 | | - portRESET_PRIVILEGE(); |
1760 | | - portMEMORY_BARRIER(); |
1761 | | - } |
1762 | | - else |
1763 | | - { |
1764 | | - xReturn = xTimerCreateStatic( pcTimerName, xTimerPeriodInTicks, uxAutoReload, pvTimerID, pxCallbackFunction, pxTimerBuffer ); |
1765 | | - } |
1766 | | - |
1767 | | - return xReturn; |
1768 | | - } |
1769 | | - #endif /* if ( ( configSUPPORT_STATIC_ALLOCATION == 1 ) && ( configUSE_TIMERS == 1 ) ) */ |
1770 | | -/*-----------------------------------------------------------*/ |
1771 | | - |
1772 | 1717 | #if ( configUSE_TIMERS == 1 ) |
1773 | 1718 | void * MPU_pvTimerGetTimerID( const TimerHandle_t xTimer ) /* FREERTOS_SYSTEM_CALL */ |
1774 | 1719 | { |
|
1870 | 1815 | #endif /* if ( configUSE_TIMERS == 1 ) */ |
1871 | 1816 | /*-----------------------------------------------------------*/ |
1872 | 1817 |
|
1873 | | - #if ( ( INCLUDE_xTimerPendFunctionCall == 1 ) && ( configUSE_TIMERS == 1 ) ) |
1874 | | - BaseType_t MPU_xTimerPendFunctionCall( PendedFunction_t xFunctionToPend, |
1875 | | - void * pvParameter1, |
1876 | | - uint32_t ulParameter2, |
1877 | | - TickType_t xTicksToWait ) /* FREERTOS_SYSTEM_CALL */ |
1878 | | - { |
1879 | | - BaseType_t xReturn; |
1880 | | - |
1881 | | - if( portIS_PRIVILEGED() == pdFALSE ) |
1882 | | - { |
1883 | | - portRAISE_PRIVILEGE(); |
1884 | | - portMEMORY_BARRIER(); |
1885 | | - |
1886 | | - xReturn = xTimerPendFunctionCall( xFunctionToPend, pvParameter1, ulParameter2, xTicksToWait ); |
1887 | | - portMEMORY_BARRIER(); |
1888 | | - |
1889 | | - portRESET_PRIVILEGE(); |
1890 | | - portMEMORY_BARRIER(); |
1891 | | - } |
1892 | | - else |
1893 | | - { |
1894 | | - xReturn = xTimerPendFunctionCall( xFunctionToPend, pvParameter1, ulParameter2, xTicksToWait ); |
1895 | | - } |
1896 | | - |
1897 | | - return xReturn; |
1898 | | - } |
1899 | | - #endif /* if ( ( INCLUDE_xTimerPendFunctionCall == 1 ) && ( configUSE_TIMERS == 1 ) ) */ |
1900 | | -/*-----------------------------------------------------------*/ |
1901 | | - |
1902 | 1818 | #if ( configUSE_TIMERS == 1 ) |
1903 | 1819 | void MPU_vTimerSetReloadMode( TimerHandle_t xTimer, |
1904 | 1820 | const UBaseType_t uxAutoReload ) /* FREERTOS_SYSTEM_CALL */ |
|
0 commit comments