Skip to content

Commit 05d9a93

Browse files
authored
Merge branch 'main' into posix-dont-break-external-threads
2 parents aa8fcad + b5d1b97 commit 05d9a93

File tree

4 files changed

+67
-62
lines changed

4 files changed

+67
-62
lines changed

.github/workflows/kernel-demos.yml

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -150,16 +150,25 @@ jobs:
150150
with:
151151
path: ./FreeRTOS/Source
152152

153-
- name: Install MSP430 Toolchain
153+
- env:
154+
stepName: Install MSP430 Toolchain
154155
shell: bash
155156
run: |
156-
sudo apt-get -y update
157-
sudo apt-get -y install gcc-msp430 build-essential
157+
# ${{ env.stepName }}
158+
echo -e "::group::${{ env.bashInfo }} ${{ env.stepName }} ${{ env.bashEnd }}"
159+
curl -L -O https://dr-download.ti.com/software-development/ide-configuration-compiler-or-debugger/MD-LlCjWuAbzH/9.3.1.2/msp430-gcc-full-linux-x64-installer-9.3.1.2.7z
160+
sudo apt update -y
161+
sudo apt install -y p7zip-full
162+
7z x ./msp430-gcc-full-linux-x64-installer-9.3.1.2.7z
163+
chmod +x ./msp430-gcc-full-linux-x64-installer-9.3.1.2.run
164+
sudo ./msp430-gcc-full-linux-x64-installer-9.3.1.2.run --prefix /usr/bin/msp430-gcc --mode unattended
165+
echo "::endgroup::"
166+
echo -e "${{ env.bashPass }} ${{ env.stepName }} ${{ env.bashEnd }}"
158167
159168
- name: Build msp430_GCC Demo
160169
shell: bash
161170
working-directory: FreeRTOS/Demo/msp430_GCC
162-
run: make -j
171+
run: make -j CC=/usr/bin/msp430-gcc/bin/msp430-elf-gcc OPT="-Os -I/usr/bin/msp430-gcc/include -L/usr/bin/msp430-gcc/include"
163172

164173
MicroBlaze-GCC:
165174
name: GCC MicroBlaze Toolchain

include/message_buffer.h

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,12 @@
4343
* writer and reader to be different tasks or interrupts, but, unlike other
4444
* FreeRTOS objects, it is not safe to have multiple different writers or
4545
* multiple different readers. If there are to be multiple different writers
46-
* then the application writer must place each call to a writing API function
47-
* (such as xMessageBufferSend()) inside a critical section and set the send
48-
* block time to 0. Likewise, if there are to be multiple different readers
49-
* then the application writer must place each call to a reading API function
50-
* (such as xMessageBufferRead()) inside a critical section and set the receive
51-
* timeout to 0.
46+
* then the application writer must serialize calls to writing API functions
47+
* (such as xStreamBufferSend()). Likewise, if there are to be multiple
48+
* different readers then the application writer must serialize calls to reading
49+
* API functions (such as xStreamBufferReceive()). One way to achieve such
50+
* serialization in single core or SMP kernel is to place each API call inside a
51+
* critical section and use a block time of 0.
5252
*
5353
* Message buffers hold variable length messages. To enable that, when a
5454
* message is written to the message buffer an additional sizeof( size_t ) bytes
@@ -306,12 +306,12 @@ typedef StreamBufferHandle_t MessageBufferHandle_t;
306306
* writer and reader to be different tasks or interrupts, but, unlike other
307307
* FreeRTOS objects, it is not safe to have multiple different writers or
308308
* multiple different readers. If there are to be multiple different writers
309-
* then the application writer must place each call to a writing API function
310-
* (such as xMessageBufferSend()) inside a critical section and set the send
311-
* block time to 0. Likewise, if there are to be multiple different readers
312-
* then the application writer must place each call to a reading API function
313-
* (such as xMessageBufferRead()) inside a critical section and set the receive
314-
* block time to 0.
309+
* then the application writer must serialize calls to writing API functions
310+
* (such as xStreamBufferSend()). Likewise, if there are to be multiple
311+
* different readers then the application writer must serialize calls to reading
312+
* API functions (such as xStreamBufferReceive()). One way to achieve such
313+
* serialization in single core or SMP kernel is to place each API call inside a
314+
* critical section and use a block time of 0.
315315
*
316316
* Use xMessageBufferSend() to write to a message buffer from a task. Use
317317
* xMessageBufferSendFromISR() to write to a message buffer from an interrupt
@@ -409,12 +409,12 @@ typedef StreamBufferHandle_t MessageBufferHandle_t;
409409
* writer and reader to be different tasks or interrupts, but, unlike other
410410
* FreeRTOS objects, it is not safe to have multiple different writers or
411411
* multiple different readers. If there are to be multiple different writers
412-
* then the application writer must place each call to a writing API function
413-
* (such as xMessageBufferSend()) inside a critical section and set the send
414-
* block time to 0. Likewise, if there are to be multiple different readers
415-
* then the application writer must place each call to a reading API function
416-
* (such as xMessageBufferRead()) inside a critical section and set the receive
417-
* block time to 0.
412+
* then the application writer must serialize calls to writing API functions
413+
* (such as xStreamBufferSend()). Likewise, if there are to be multiple
414+
* different readers then the application writer must serialize calls to reading
415+
* API functions (such as xStreamBufferReceive()). One way to achieve such
416+
* serialization in single core or SMP kernel is to place each API call inside a
417+
* critical section and use a block time of 0.
418418
*
419419
* Use xMessageBufferSend() to write to a message buffer from a task. Use
420420
* xMessageBufferSendFromISR() to write to a message buffer from an interrupt
@@ -516,12 +516,12 @@ typedef StreamBufferHandle_t MessageBufferHandle_t;
516516
* writer and reader to be different tasks or interrupts, but, unlike other
517517
* FreeRTOS objects, it is not safe to have multiple different writers or
518518
* multiple different readers. If there are to be multiple different writers
519-
* then the application writer must place each call to a writing API function
520-
* (such as xMessageBufferSend()) inside a critical section and set the send
521-
* block time to 0. Likewise, if there are to be multiple different readers
522-
* then the application writer must place each call to a reading API function
523-
* (such as xMessageBufferRead()) inside a critical section and set the receive
524-
* block time to 0.
519+
* then the application writer must serialize calls to writing API functions
520+
* (such as xStreamBufferSend()). Likewise, if there are to be multiple
521+
* different readers then the application writer must serialize calls to reading
522+
* API functions (such as xStreamBufferReceive()). One way to achieve such
523+
* serialization in single core or SMP kernel is to place each API call inside a
524+
* critical section and use a block time of 0.
525525
*
526526
* Use xMessageBufferReceive() to read from a message buffer from a task. Use
527527
* xMessageBufferReceiveFromISR() to read from a message buffer from an
@@ -610,12 +610,12 @@ typedef StreamBufferHandle_t MessageBufferHandle_t;
610610
* writer and reader to be different tasks or interrupts, but, unlike other
611611
* FreeRTOS objects, it is not safe to have multiple different writers or
612612
* multiple different readers. If there are to be multiple different writers
613-
* then the application writer must place each call to a writing API function
614-
* (such as xMessageBufferSend()) inside a critical section and set the send
615-
* block time to 0. Likewise, if there are to be multiple different readers
616-
* then the application writer must place each call to a reading API function
617-
* (such as xMessageBufferRead()) inside a critical section and set the receive
618-
* block time to 0.
613+
* then the application writer must serialize calls to writing API functions
614+
* (such as xStreamBufferSend()). Likewise, if there are to be multiple
615+
* different readers then the application writer must serialize calls to reading
616+
* API functions (such as xStreamBufferReceive()). One way to achieve such
617+
* serialization in single core or SMP kernel is to place each API call inside a
618+
* critical section and use a block time of 0.
619619
*
620620
* Use xMessageBufferReceive() to read from a message buffer from a task. Use
621621
* xMessageBufferReceiveFromISR() to read from a message buffer from an

include/stream_buffer.h

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,12 @@
4040
* writer and reader to be different tasks or interrupts, but, unlike other
4141
* FreeRTOS objects, it is not safe to have multiple different writers or
4242
* multiple different readers. If there are to be multiple different writers
43-
* then the application writer must place each call to a writing API function
44-
* (such as xStreamBufferSend()) inside a critical section and set the send
45-
* block time to 0. Likewise, if there are to be multiple different readers
46-
* then the application writer must place each call to a reading API function
47-
* (such as xStreamBufferReceive()) inside a critical section section and set the
48-
* receive block time to 0.
43+
* then the application writer must serialize calls to writing API functions
44+
* (such as xStreamBufferSend()). Likewise, if there are to be multiple
45+
* different readers then the application writer must serialize calls to reading
46+
* API functions (such as xStreamBufferReceive()). One way to achieve such
47+
* serialization in single core or SMP kernel is to place each API call inside a
48+
* critical section and use a block time of 0.
4949
*
5050
*/
5151

@@ -514,12 +514,12 @@ typedef void (* StreamBufferCallbackFunction_t)( StreamBufferHandle_t xStreamBuf
514514
* writer and reader to be different tasks or interrupts, but, unlike other
515515
* FreeRTOS objects, it is not safe to have multiple different writers or
516516
* multiple different readers. If there are to be multiple different writers
517-
* then the application writer must place each call to a writing API function
518-
* (such as xStreamBufferSend()) inside a critical section and set the send
519-
* block time to 0. Likewise, if there are to be multiple different readers
520-
* then the application writer must place each call to a reading API function
521-
* (such as xStreamBufferReceive()) inside a critical section and set the receive
522-
* block time to 0.
517+
* then the application writer must serialize calls to writing API functions
518+
* (such as xStreamBufferSend()). Likewise, if there are to be multiple
519+
* different readers then the application writer must serialize calls to reading
520+
* API functions (such as xStreamBufferReceive()). One way to achieve such
521+
* serialization in single core or SMP kernel is to place each API call inside a
522+
* critical section and use a block time of 0.
523523
*
524524
* Use xStreamBufferSend() to write to a stream buffer from a task. Use
525525
* xStreamBufferSendFromISR() to write to a stream buffer from an interrupt
@@ -615,12 +615,12 @@ size_t xStreamBufferSend( StreamBufferHandle_t xStreamBuffer,
615615
* writer and reader to be different tasks or interrupts, but, unlike other
616616
* FreeRTOS objects, it is not safe to have multiple different writers or
617617
* multiple different readers. If there are to be multiple different writers
618-
* then the application writer must place each call to a writing API function
619-
* (such as xStreamBufferSend()) inside a critical section and set the send
620-
* block time to 0. Likewise, if there are to be multiple different readers
621-
* then the application writer must place each call to a reading API function
622-
* (such as xStreamBufferReceive()) inside a critical section and set the receive
623-
* block time to 0.
618+
* then the application writer must serialize calls to writing API functions
619+
* (such as xStreamBufferSend()). Likewise, if there are to be multiple
620+
* different readers then the application writer must serialize calls to reading
621+
* API functions (such as xStreamBufferReceive()). One way to achieve such
622+
* serialization in single core or SMP kernel is to place each API call inside a
623+
* critical section and use a block time of 0.
624624
*
625625
* Use xStreamBufferSend() to write to a stream buffer from a task. Use
626626
* xStreamBufferSendFromISR() to write to a stream buffer from an interrupt
@@ -718,12 +718,12 @@ size_t xStreamBufferSendFromISR( StreamBufferHandle_t xStreamBuffer,
718718
* writer and reader to be different tasks or interrupts, but, unlike other
719719
* FreeRTOS objects, it is not safe to have multiple different writers or
720720
* multiple different readers. If there are to be multiple different writers
721-
* then the application writer must place each call to a writing API function
722-
* (such as xStreamBufferSend()) inside a critical section and set the send
723-
* block time to 0. Likewise, if there are to be multiple different readers
724-
* then the application writer must place each call to a reading API function
725-
* (such as xStreamBufferReceive()) inside a critical section and set the receive
726-
* block time to 0.
721+
* then the application writer must serialize calls to writing API functions
722+
* (such as xStreamBufferSend()). Likewise, if there are to be multiple
723+
* different readers then the application writer must serialize calls to reading
724+
* API functions (such as xStreamBufferReceive()). One way to achieve such
725+
* serialization in single core or SMP kernel is to place each API call inside a
726+
* critical section and use a block time of 0.
727727
*
728728
* Use xStreamBufferReceive() to read from a stream buffer from a task. Use
729729
* xStreamBufferReceiveFromISR() to read from a stream buffer from an

portable/ThirdParty/GCC/Posix/port.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,6 @@
6565
#include <time.h>
6666
#include <unistd.h>
6767

68-
#ifdef __APPLE__
69-
#include <mach/mach_vm.h>
70-
#endif
71-
7268
/* Scheduler includes. */
7369
#include "FreeRTOS.h"
7470
#include "task.h"

0 commit comments

Comments
 (0)