Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge SMP feature to main #716

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
173 commits
Select commit Hold shift + click to select a range
fafd246
Add vTaskYieldWithinAPI for taskYIELD_IF_USING_PREEMPTION
chinglee-iot May 26, 2022
14c3b6e
Use portYIELD_WITHIN_API for portYIELD_WITHIN_API for single core
chinglee-iot Jun 2, 2022
2b6d163
Add xTaskRunState and xIsIdle in TCB
chinglee-iot Jun 1, 2022
c348779
Add pxCurrentTCBs for multiple cores
chinglee-iot Jun 1, 2022
70bdf23
Add SMP critical section functions
chinglee-iot Jun 13, 2022
cb5ab6d
Add SMP prvYieldCore and prvYieldForTask
chinglee-iot Jun 14, 2022
42f96a1
Add idle tasks for SMP
chinglee-iot Jun 14, 2022
a0d7477
Merge vTaskSuspendAll and xTaskResumeAll from SMP branch
chinglee-iot Jun 20, 2022
a2c83bf
Merge vTaskResume and xTaskResumeFromISR from SMP
chinglee-iot Jun 23, 2022
fb34396
Merge xTaskIncrementTick from SMP
chinglee-iot Jun 28, 2022
16f266a
Update prvYieldForTask usage in kernel APIs
chinglee-iot Jun 29, 2022
b58d52d
Merge prvAddNewTaskToReadyList from SMP
chinglee-iot Jul 4, 2022
8a3f046
Merge vTaskSwitchContext from SMP
chinglee-iot Jul 6, 2022
826fe08
Merge vTaskDelete from SMP
chinglee-iot Jul 6, 2022
e364cf9
Merge vTaskSuspend from SMP
chinglee-iot Jul 8, 2022
ae5ca2a
Set minimal idle task idle attribute
chinglee-iot Jul 20, 2022
a095cdc
Move prvCreateIdleTasks forward and check return value
chinglee-iot Aug 3, 2022
e1d1104
Add minimal idle hook config check
chinglee-iot Aug 3, 2022
7718e91
Fix xTaskResumeAll in SMP
chinglee-iot Jul 20, 2022
0ef26d9
check scheduler suspended when scheduler is running
chinglee-iot Jul 26, 2022
cc99f57
Move suspend scheduler inside critical section
chinglee-iot Jul 27, 2022
4a601d3
Update comment for uxSchedulerSuspended
chinglee-iot Aug 3, 2022
ea47a92
Add back xPendingReadyList for single core
chinglee-iot Aug 3, 2022
64f4195
Use critical section for SMP
chinglee-iot Aug 3, 2022
f6faebb
Add in ISR check in prvCheckForRunStateChange function
chinglee-iot Jul 26, 2022
5ccb164
Add critical section protect for context switch
chinglee-iot Jul 26, 2022
431ff1d
Add vTaskSwitchContextForCore declaration
chinglee-iot Jul 26, 2022
28fc702
Fix missing macro and check for single core
chinglee-iot Jul 26, 2022
ae52352
Fix task delete condition
chinglee-iot Aug 1, 2022
fdbd935
Use critical section to protect more in SMP for vTaskDelete
chinglee-iot Aug 6, 2022
72228c3
Merge SMP prvSelectHighestPriorityTask to main
chinglee-iot Jul 11, 2022
893fdbe
Merge prvCheckTasksWaitingTermination from SMP branch
chinglee-iot Jul 14, 2022
39ec7ce
Move prvDeleteTCB outside of critical section
chinglee-iot Aug 1, 2022
7dc3d54
Add NULL pointer check in prvCheckTasksWaitingTermination
chinglee-iot Aug 2, 2022
fbbc597
Update for performance
chinglee-iot Sep 20, 2022
2c5b814
Update prvSelectHighestPriorityTask
chinglee-iot Sep 20, 2022
ac27308
Merge vTaskYieldWithinAPI from SMP
chinglee-iot Jul 14, 2022
35c589e
Merge vTaskPrioritySet from SMP branch
chinglee-iot Jul 16, 2022
453487c
Void prvYieldForTask return value in vTaskPrioritySet
chinglee-iot Aug 3, 2022
fdaf435
Yield for SMP when set priority
chinglee-iot Jul 27, 2022
411d555
Move vTaskDelay check uxSchedulerSuspended
chinglee-iot Jul 26, 2022
b545877
Update code logic for performance
chinglee-iot Sep 21, 2022
120c2d8
Fix yield for task in single core
chinglee-iot Sep 21, 2022
150d6ce
Merge timer change from SMP branch
chinglee-iot Jul 18, 2022
ad7644d
Add RP2040 SMP porting support
chinglee-iot Jul 26, 2022
8e40e57
Seperate task state for SMP and single core
chinglee-iot Jul 27, 2022
3fb87f5
Merge configRUN_MULTIPLE_PRIORITIES from SMP branch
chinglee-iot Jul 27, 2022
6ac1757
Merge configUSE_TASK_PREEMPTION_DISABLE from SMP
chinglee-iot Jul 29, 2022
a7503ba
Merge configUSE_CORE_AFFINITY from SMP
chinglee-iot Aug 2, 2022
182a9f8
Update pxYieldSpinLocks to per-cpu variable in SMP
chinglee-iot Aug 4, 2022
4df96ed
Remove TODO log
chinglee-iot Aug 31, 2022
91de74c
Add suppport for ARM CM55 (#494)
alfred2g Jun 1, 2022
fd19dba
add extra check for compiler time (#499)
AndreiCherniaev Jun 2, 2022
a4b73d1
Update feature_request.md (#500)
tanmoysen Jun 8, 2022
76911db
Add callback overrides for stream buffer and message buffers (#437)
ravibhagavandas Jun 21, 2022
8d0804d
Add configUSE_MUTEXES to function declarations in header (#504)
aggarg Jun 21, 2022
0394132
RP2040: Remove incorrect assertion (#508)
kilograham Jun 22, 2022
d933591
Ensure that xTaskGetCurrentTaskHandle is included (#507)
aggarg Jun 23, 2022
2b8c017
RP2040: Allow FreeRTOS to be added to the parent CMake project post i…
kilograham Jun 24, 2022
aa8325c
Update to TF-M version TF-Mv1.6.0 (#517)
xinyu-tfm Jun 29, 2022
26b31e7
Update submodule pointer of Community Supported Ports (#486)
aggarg Jun 29, 2022
75cd3cd
Add Cortex M7 r0p1 Errata 837070 workaround to CM4_MPU ports (#513)
paulbartell Jun 30, 2022
e6b6c69
RP2040: Use indirect reference for pxCurrentTCB (#525)
NomiChirps Jul 18, 2022
253909e
Posix: Removed unused signal set from port (#528)
0xjakob Jul 25, 2022
0d12faa
Add SBOM Generation in auto_release.yml (#524)
xlin7799 Jul 28, 2022
1a1cb40
add portDONT_DISCARD to pxCurrentTCB (#479)
pattop Aug 2, 2022
60d10cf
Implement MicroBlazeV9 stack protection (#523)
uecasm Aug 3, 2022
c1e4b26
Update codecov action to v3.1.0
paulbartell Jun 28, 2022
74ceb47
Add vPortRemoveInterruptHandler API (#533)
aggarg Aug 3, 2022
da0210b
Fix NULL pointer dereference in vPortGetHeapStats
aggarg Aug 4, 2022
74f54bb
Change type of message buffer handle (#537)
ravibhagavandas Aug 4, 2022
3438785
Block SIG_RESUME in the main thread of the Posix port so that sigwait…
chrisnc Aug 4, 2022
4bad786
Update History.txt (#535)
aggarg Aug 7, 2022
6ac9bf2
Add .syntax unified to GCC assembly functions (#538)
aggarg Aug 7, 2022
3e5adfb
Generalize Thread Local Storage (TLS) support (#540)
aggarg Aug 8, 2022
b936cd4
Change default value of INCLUDE_xTaskGetCurrentTaskHandle (#542)
ravibhagavandas Aug 9, 2022
01b99aa
Include string.h at the top of portable/GCC/ARM_CA9/port.c to prevent…
RichardBarry Aug 9, 2022
fbfffc4
Move some of the complex pre-processor guards on prvWriteNameToBuffer…
RichardBarry Dec 19, 2021
3667d02
Fix formatting of FreeRTOS.h
paulbartell Aug 9, 2022
9a6713e
correct grammar in include/FreeRTOS.h
paulbartell Aug 9, 2022
f2dc981
Fix warnings in posix port (#544)
archigup Aug 16, 2022
c9d3b11
Add support for MISRA rule 20.7 (#546)
moninom1 Aug 19, 2022
3e6dbc7
Add FreeRTOS config directory to include dirs (#548)
aggarg Aug 22, 2022
d23da2e
[Fix] Type for pointers operations (#550)
Octaviarius Aug 30, 2022
204f08c
RISC-V: Add support for RV32E extension in GCC port (#543)
Limoto Aug 30, 2022
00ca174
Added checks for index in ThreadLocalStorage APIs (#552)
AniruddhaKanhere Sep 1, 2022
274e304
Update of three badly terminated macro definitions (#555)
newbrain Sep 8, 2022
d76951b
M85 support (#556)
gbrtth Sep 13, 2022
a3d4a1d
portable-RP2040: Fix typo in README.md (#559)
paulbartell Sep 14, 2022
426b120
Update CMakeLists.txt for Cortex-M55 and Cortex-M85 ports (#560)
paulbartell Sep 16, 2022
a17b7bb
Use highest numbered MPU regions for kernel
aggarg Sep 7, 2022
b183388
Make RAM regions non-executable
aggarg Sep 7, 2022
6886921
Remove local stack variable form MPU wrappers
aggarg Sep 7, 2022
54faa48
Restrict unpriv task to invoke code with privilege
aggarg Sep 7, 2022
160f731
Update History.txt
aggarg Sep 16, 2022
4c8f520
Update History.txt as per the PR feedback
aggarg Sep 16, 2022
b595adf
Update RISC-V IAR port to support vector mode. (#458)
mingyue86010 Sep 20, 2022
c5a1fee
Added better pointer declaration readability (#567)
cristiancristea00 Sep 26, 2022
b939e2f
Update doc comments in task.h (#570)
aggarg Sep 28, 2022
5539028
Tickless idle fixes/improvement (#59)
jefftenney Oct 3, 2022
9965dcd
Merge SMP commit 45dd83a8e
chinglee-iot Oct 6, 2022
8294974
Merge SMP b87dfa3e9
chinglee-iot Oct 6, 2022
b9dfba3
Merge SMP 13f034eb7
chinglee-iot Oct 6, 2022
136385a
Fix compiler warning and spelling
chinglee-iot Oct 7, 2022
04e97b1
Fix Add new task for single core when scheduler not running
chinglee-iot Oct 16, 2022
1a8af51
Fix priority set when task is not in ready list for single core
chinglee-iot Oct 16, 2022
1b2b2a8
Fix vTaskResume when task is not running
chinglee-iot Oct 16, 2022
56d1d75
Fix uncrustify formating warning
chinglee-iot Oct 16, 2022
9763a35
Add portCHECK_IF_IN_ISR for SMP
chinglee-iot Oct 17, 2022
e0c1bf8
Format vTaskSwitchContext
chinglee-iot Oct 21, 2022
54faeaf
Fix vTaskSwitchContextForCore bug due to uncrustify
chinglee-iot Oct 25, 2022
9636cdb
First review - did not build yet
aggarg Nov 6, 2022
96205d7
Corresponding changes in FreeRTOS.h and task.h
aggarg Nov 6, 2022
ea4048e
Fix the single core compilation
chinglee-iot Nov 7, 2022
b9e588c
Fix compilation warning
chinglee-iot Nov 7, 2022
d2064c1
Update xTaskGetCurrentTaskHandleCPU API
chinglee-iot Nov 7, 2022
de64fa7
Make the list traverse loop more readable
aggarg Nov 7, 2022
3df1ad7
Remove unnecessary loop in xTaskIncrementTick for single core
chinglee-iot Nov 8, 2022
ab074f5
Update uxSchedulerSuspended with ISR lock in prvCheckForRunStateChange
chinglee-iot Nov 7, 2022
3f9366f
Updated ESP32 port-layer to ESP-IDF `v4.4.2` (#572)
laukik-hase Oct 11, 2022
ed83560
Add warning message to ensure min stack size (#575)
arshi016 Oct 12, 2022
39723cb
Removed the 'configASSERT( xInheritanceOccurred == pdFALSE )' asserti…
Erlkoenig90 Oct 13, 2022
189ffd6
Update the NIOSII port to enable longer jumps (#578)
RichardBarry Oct 20, 2022
1ad8899
Update Cortex-M55 and Cortex-M85 ports (#579)
aggarg Oct 28, 2022
f209c6e
Fix context switch when time slicing is off (#568)
aggarg Nov 8, 2022
15a7e2d
Merge commit "Add support for retrieving a task's uxCoreAffinityMask
chinglee-iot Nov 10, 2022
c7ec4cc
Merge branch 'main' into smp-dev-complete-merge-candidate-history
chinglee-iot Nov 10, 2022
82b4cc2
Use taskENTER/EXIT_CRITICAL_FROM_ISR (#38)
chinglee-iot Nov 15, 2022
7c5fce8
Merge branch 'main' into smp-dev-complete-merge-candidate-history
chinglee-iot Nov 23, 2022
f257f6d
Improve single core unit test coverage (#42)
chinglee-iot Nov 23, 2022
9090fcc
Yield for task when core affinity changed (#41)
chinglee-iot Nov 24, 2022
c9ba84d
Remove builtin clz in prvSelectHighestPriorityTask (#37)
chinglee-iot Nov 24, 2022
31a7e85
Move critical nesting count to port (#47)
chinglee-iot Nov 29, 2022
89fa181
Rename config num cores (#48)
chinglee-iot Nov 29, 2022
3742ae8
Merge branch 'merge-main-1' into smp-dev-complete-merge-candidate-his…
chinglee-iot Nov 30, 2022
2d90cf8
Merge branch 'merge-main-2' into smp-dev-complete-merge-candidate-his…
chinglee-iot Nov 30, 2022
9396e37
Merge branch 'merge-main-3' into smp-dev-complete-merge-candidate-his…
chinglee-iot Nov 30, 2022
21d9a61
Merge branch 'main' into stage-history
chinglee-iot Nov 30, 2022
ef88897
Fix the task selection when task yields (#54)
chinglee-iot Jan 6, 2023
87aa631
Move xTaskIncrementTick critical section to port (#55)
chinglee-iot Jan 6, 2023
57d201c
Not preempt equal priority task in the following functions (#56)
chinglee-iot Jan 6, 2023
8b13d4b
Remove implicit test (#49)
chinglee-iot Jan 9, 2023
c785ebf
Fix preempt equal priority task in xTaskIncrementTick (#58)
chinglee-iot Jan 12, 2023
161a2c7
Remove prvSelectHighestPriorityTask call in vTaskSuspend (#59)
chinglee-iot Jan 24, 2023
b266846
Adding portIDLE_TASK_TEST_MOCK in idle task function (#66)
chinglee-iot Feb 17, 2023
b051d24
Add INFINITE_LOOP macro to test idle task function (#67)
chinglee-iot Feb 24, 2023
350c5c3
portYield is not called when exit critical section from ISR (#60)
chinglee-iot Apr 13, 2023
39d709e
Fix list index is moved in prvSearchForNameWithinSingleList (#61)
chinglee-iot Apr 13, 2023
d1c625e
Yield for priority inherit and disinherit (#64)
chinglee-iot Apr 13, 2023
6ce84d8
fix performance counting for SMP (#65)
chinglee-iot Apr 13, 2023
4fed100
Remomve unreachable assert in prvCheckForRunStateChange (#68)
chinglee-iot Apr 13, 2023
8c067d6
Remove unreachable code in preYieldForTask (#69)
chinglee-iot Apr 13, 2023
a286632
Add first version of XCOREAI port (#63)
chinglee-iot Apr 18, 2023
3c31ea9
Fix configDEINIT_TLS_BLOCK (#73)
Dazza0 Apr 18, 2023
3578892
Sync with main branch (#71)
chinglee-iot Apr 18, 2023
14cec43
Smp dev merge main 20230410 (#74)
chinglee-iot Apr 18, 2023
28387df
Not yield for running task in prvYieldForTask (#72)
chinglee-iot Apr 18, 2023
23ce58e
Remove unreachable code in prvSelectHighestPriorityTask (#70)
chinglee-iot Apr 20, 2023
9da6836
Move static idle task memory to global scope (#75)
chinglee-iot Apr 20, 2023
2d281c7
Update XMOS AICORE conflict (#77)
chinglee-iot Apr 21, 2023
e35fd38
Fix run time stats for SMP (#76)
chinglee-iot Apr 21, 2023
096a582
Update the uxSchedulerSuspended after prvCheckForRunStateChange (#62)
chinglee-iot Apr 24, 2023
37ebbd8
Fix SMP dev branch CI errors (#79)
chinglee-iot Apr 25, 2023
87c9c23
Fix ulTotalRunTime and ulTaskSwitchedInTime (#80)
chinglee-iot Apr 25, 2023
b40b9e3
Smp dev compelete merge main 20230424 (#78)
chinglee-iot Apr 25, 2023
c4a8d7a
Update coverity violation for SMP (#81)
chinglee-iot May 16, 2023
b184cb7
Smp dev merge main 0527 (#82)
chinglee-iot May 17, 2023
56a360e
Merge main to SMP branch (#86)
chinglee-iot Jul 21, 2023
b9a50bd
Merge branch 'main' into smp-dev-merge-main-0721
chinglee-iot Jul 21, 2023
7acf8fd
Merge main to SMP branch 0721 (#90)
chinglee-iot Jul 21, 2023
4e74560
Merge branch 'smp-dev-merge-main-0721' into smp-dev-complete-merge-ca…
chinglee-iot Jul 21, 2023
9be537e
Move default configNUMBER_OF_CORES definition forward in FreeRTOSConf…
chinglee-iot Jul 24, 2023
0afe21a
Merge branch 'main' into smp-dev-complete-merge-candidate-history
chinglee-iot Jul 24, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
50 changes: 33 additions & 17 deletions .github/lexicon.txt
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,7 @@ coprocessor
coprocessors
coreid
coroutinehandle
coverity
covfs
cp
cpacr
Expand All @@ -340,31 +341,20 @@ cprivilegedonlyaccessarray
cpsid
cpsie
cpsr
cpsr
cpstored
cpstored
cpu
cpu
cr
cr
crc
crc
crcb
crcoroutine
crcoroutine
crdelay
crdelay
creadonlyarray
creadwritearray
createevent
crend
crend
crgint
croutine
croutine
crqueue
crqueue
crstart
crstart
crt
crtv
Expand Down Expand Up @@ -1110,6 +1100,7 @@ mikroc
min
mingw
minilistitem
minimalidle
mips
misadd
misc
Expand Down Expand Up @@ -1539,25 +1530,24 @@ prstc
prttc
prv
prvaddcurrenttasktodelayedlist
prvcheckforrunstatechange
prvcheckinterfaces
prvchecktaskswaitingtermination
prvcopydatatoqueue
prvcoroutineflashtask
prvcoroutineflashtask
prvcoroutineflashworktask
prvcoroutineflashworktask
prvdeletetcb
prvexitfunction
prvgettimens
prvheapinit
prvidletask
prvinitialisecoroutinelists
prvinitialisecoroutinelists
prvinitialisemutex
prvinitialisenewstreambuffer
prvinitialisenewtimer
prvinsertblockintofreelist
prvlockqueue
prvminimalidletask
prvnotifyqueuesetcontainer
prvportmalloc
prvportresetpic
Expand All @@ -1575,6 +1565,7 @@ prvtickcount
prvtimercallback
prvwritebytestobuffer
prvwritemessagetobuffer
prvyieldfortask
prvyieldhandler
ps
psp
Expand Down Expand Up @@ -1668,13 +1659,10 @@ pxcallbackfunction
pxcode
pxcontainer
pxcoroutinecode
pxcoroutinecode
pxcoroutinewoken
pxcoroutinewoken
pxcrcb
pxcreatedtask
pxcurrentcoroutine
pxcurrentcoroutine
pxcurrenttcb
pxcurrenttcbconst
pxcurrenttimerlist
Expand Down Expand Up @@ -1795,6 +1783,7 @@ rdc
rdr
rdrf
rdy
reacquisition
readbit
readme
readvalue
Expand Down Expand Up @@ -2439,6 +2428,7 @@ uxbitstoset
uxbitstowait
uxbitstowaitfor
uxcontrolbits
uxcoreaffinitymask
uxcriticalnesting
uxcurrenteventbits
uxcurrentnumberoftasks
Expand All @@ -2462,9 +2452,12 @@ uxlength
uxlistremove
uxmaxcount
uxmessageswaiting
uxnetworkingcoreaffinitymask
uxnewpriority
uxoriginalpriority
uxpendedcounts
uxportcomparesetextram
uxprevschedulersuspended
uxpriority
uxprioritytouse
uxqueue
Expand All @@ -2483,6 +2476,7 @@ uxsemaphoregetcount
uxsemaphoregetcountfromisr
uxstate
uxstreambuffernumber
uxtaskattributes
uxtaskgetnumberoftasks
uxtaskgetstackhighwatermark
uxtaskgetsystemstate
Expand Down Expand Up @@ -2516,6 +2510,7 @@ vapplicationgettimertaskmemory
vapplicationidlehook
vapplicationirqhandler
vapplicationmallocfailedhook
vapplicationminimalidlehook
vapplicationsetuptickinterrupt
vapplicationsetupticktimerinterrupt
vapplicationsetuptimerinterrupt
Expand Down Expand Up @@ -2618,12 +2613,15 @@ vstreambufferdelete
vtask
vtaskallocatempuregions
vtaskcode
vtaskcoreaffinityget
vtaskcoreaffinityset
vtaskdelay
vtaskdelayuntil
vtaskdelete
vtaskendscheduler
vtaskentercritical
vtaskexitcritical
vtaskexitcriticalfromisr
vtaskfunction
vtaskgetinfo
vtaskgetruntimestats
Expand All @@ -2632,6 +2630,8 @@ vtasknotify
vtasknotifygivefromisr
vtasknotifygiveindexedfromisr
vtaskplaceoneventlist
vtaskpreemptiondisable
vtaskpreemptionenable
vtaskpriorityset
vtaskremovefromunorderedeventlist
vtaskresume
Expand All @@ -2645,6 +2645,7 @@ vtasksteptick
vtasksuspend
vtasksuspendall
vtaskswitchcontext
vtaskswitchcontextforcore
vtaskusesdpfpu
vtickisr
vtimercallback
Expand Down Expand Up @@ -2742,6 +2743,8 @@ xcommandtime
xcommsrxqueue
xconsttickcount
xcopyposition
xcore
xcoreid
xcoroutinecreate
xcoroutinepreviouslywoken
xcoroutinequeue
Expand Down Expand Up @@ -2824,6 +2827,8 @@ xhigherpriorittaskwoken
xhigherprioritytaskwoken
xhigherprioritytaskwokenbypost
xidletaskhandle
xidletaskhandles
xidletcbbuffers
xilinx
xindex
xinheritanceoccurred
Expand All @@ -2843,6 +2848,9 @@ xlastwaketime
xlength
xlist
xlistend
xlowestpriority
xlowestprioritycore
xlowestprioritytopreempt
xmair
xmaxcount
xmaxexpirycountbeforestopping
Expand Down Expand Up @@ -2881,6 +2889,7 @@ xmutexbuffer
xmutexholder
xn
xnearstartscheduler
xnetworkingtaskhandle
xnewperiod
xnewqueue
xnextexpiretime
Expand Down Expand Up @@ -2913,6 +2922,7 @@ xportregistercinterrupthandler
xportregisterdump
xportstartfirsttask
xportstartscheduler
xpreemptiondisable
xpsr
xqueue
xqueueaddtoset
Expand Down Expand Up @@ -3026,6 +3036,7 @@ xtail
xtal
xtask
xtaskabortdelay
xtaskattribute
xtaskbuffer
xtaskcallapplicationtaskhook
xtaskcatchupticks
Expand Down Expand Up @@ -3072,6 +3083,7 @@ xtasknumber
xtaskremovefromeventlist
xtaskresumeall
xtaskresumefromisr
xtaskrunstate
xtaskswaitingforbits
xtaskswaitingtermination
xtaskswaitingtoreceive
Expand Down Expand Up @@ -3108,6 +3120,7 @@ xtimercreate
xtimercreated
xtimercreatestatic
xtimerdelete
xtimergenericcommand
xtimergetexpirytime
xtimergetperiod
xtimergetreloadmode
Expand Down Expand Up @@ -3143,5 +3156,8 @@ xwantedsize
xwasdelayed
xwritevalue
xxr
xyieldfortask
xyieldpending
xyieldpendings
xzr
yeilding
3 changes: 2 additions & 1 deletion .github/scripts/kernel_checker.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,8 @@
r'.*\.git.*',
r'.*portable/IAR/AtmelSAM7S64/.*AT91SAM7.*',
r'.*portable/GCC/ARM7_AT91SAM7S/.*',
r'.*portable/MPLAB/PIC18F/stdio.h'
r'.*portable/MPLAB/PIC18F/stdio.h',
r'.*portable/ThirdParty/xClang/XCOREAI/*'
]

KERNEL_THIRD_PARTY_PATTERNS = [
Expand Down
72 changes: 72 additions & 0 deletions MISRA.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
# MISRA Compliance

FreeRTOS-Kernel conforms to [MISRA C:2012](https://www.misra.org.uk/misra-c)
guidelines, with the deviations listed below. Compliance is checked with
Coverity static analysis. Since the FreeRTOS kernel is designed for
small-embedded devices, it needs to have a very small memory footprint and
has to be efficient. To achieve that and to increase the performance, it
deviates from some MISRA rules. The specific deviations, suppressed inline,
are listed below.

Additionally, [MISRA configuration](#misra-configuration) contains project
wide deviations.

### Suppressed with Coverity Comments
To find the violation references in the source files run grep on the source code
with ( Assuming rule 8.4 violation; with justification in point 1 ):
```
grep 'MISRA Ref 8.4.1' . -rI
```

#### Rule 8.4

_Ref 8.4.1_

- MISRA C:2012 Rule 8.4: A compatible declaration shall be visible when an
object or function with external linkage is defined.
This rule requires that a compatible declaration is made available
in a header file when an object with external linkage is defined.
pxCurrentTCB(s) is defined with external linkage but it is only
referenced from the assembly code in the port files. Therefore, adding
a declaration in header file is not useful as the assembly code will
still need to declare it separately.

### MISRA configuration

Copy below content to `misra.conf` to run Coverity on FreeRTOS-Kernel.

```
// MISRA C-2012 Rules
{
version : "2.0",
standard : "c2012",
title: "Coverity MISRA Configuration",
deviations : [
// Disable the following rules.
{
deviation: "Directive 4.8",
reason: "HeapRegion_t and HeapStats_t are used only in heap files but declared in portable.h which is included in multiple source files. As a result, these definitions appear in multiple source files where they are not used."
},
{
deviation: "Directive 4.9",
reason: "FreeRTOS-Kernel is optimised to work on small micro-controllers. To achieve that, function-like macros are used."
},
{
deviation: "Rule 1.2",
reason: "The __attribute__ tags are used via macros which are defined in port files."
},
{
deviation: "Rule 3.1",
reason: "We post HTTP links in code comments which contain // inside comments blocks."
},
{
deviation: "Rule 8.7",
reason: "API functions are not used by the library outside of the files they are defined; however, they must be externally visible in order to be used by an application."
},
{
deviation: "Rule 11.5",
reason: "Allow casts from `void *`. List owner, pvOwner, is stored as `void *` and are cast to various types for use in functions."
}
]
}
```
24 changes: 20 additions & 4 deletions event_groups.c
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,15 @@
{
if( xAlreadyYielded == pdFALSE )
{
portYIELD_WITHIN_API();
#if ( configNUMBER_OF_CORES == 1 )
{
portYIELD_WITHIN_API();

Check warning on line 268 in event_groups.c

View check run for this annotation

Codecov / codecov/patch

event_groups.c#L268

Added line #L268 was not covered by tests
}
#else /* #if ( configNUMBER_OF_CORES == 1 ) */
{
vTaskYieldWithinAPI();
}
#endif /* #if ( configNUMBER_OF_CORES == 1 ) */
}
else
{
Expand Down Expand Up @@ -415,7 +423,15 @@
{
if( xAlreadyYielded == pdFALSE )
{
portYIELD_WITHIN_API();
#if ( configNUMBER_OF_CORES == 1 )
{
portYIELD_WITHIN_API();

Check warning on line 428 in event_groups.c

View check run for this annotation

Codecov / codecov/patch

event_groups.c#L428

Added line #L428 was not covered by tests
}
#else /* #if ( configNUMBER_OF_CORES == 1 ) */
{
vTaskYieldWithinAPI();
}
#endif /* #if ( configNUMBER_OF_CORES == 1 ) */
}
else
{
Expand Down Expand Up @@ -525,11 +541,11 @@
EventGroup_t const * const pxEventBits = xEventGroup;
EventBits_t uxReturn;

uxSavedInterruptStatus = portSET_INTERRUPT_MASK_FROM_ISR();
uxSavedInterruptStatus = taskENTER_CRITICAL_FROM_ISR();
{
uxReturn = pxEventBits->uxEventBits;
}
portCLEAR_INTERRUPT_MASK_FROM_ISR( uxSavedInterruptStatus );
taskEXIT_CRITICAL_FROM_ISR( uxSavedInterruptStatus );

return uxReturn;
} /*lint !e818 EventGroupHandle_t is a typedef used in other functions to so can't be pointer to const. */
Expand Down