-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The idle thread does not have any stack, thus implementing the function in assembler avoids convincing the compiler not to use any stack for a C function. Signed-off-by: Axel Heider <[email protected]>
- Loading branch information
Showing
14 changed files
with
61 additions
and
94 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
/* | ||
* Copyright 2014, General Dynamics C4 Systems | ||
* Copyright 2020, Data61, CSIRO (ABN 41 687 119 230) | ||
* Copyright 2021, Axel Heider <[email protected]> | ||
* | ||
* SPDX-License-Identifier: GPL-2.0-only | ||
*/ | ||
|
||
#include <machine/assembler.h> | ||
|
||
/* The idle thread does not have any stack, thus this loop is implemented as | ||
* assembler function. It's easier than convincing the compiler not to use any | ||
* stack for a C function. | ||
*/ | ||
.section .text | ||
BEGIN_FUNC(idle_thread) | ||
1: wfi | ||
b 1b | ||
END_FUNC(idle_thread) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
/* | ||
* Copyright 2015, 2016 Hesham Almatary <[email protected]> | ||
* Copyright 2020, Data61, CSIRO (ABN 41 687 119 230) | ||
* Copyright 2021, Axel Heider <[email protected]> | ||
* | ||
* SPDX-License-Identifier: GPL-2.0-only | ||
*/ | ||
|
||
#include <machine/assembler.h> | ||
|
||
/* The idle thread does not have any stack, thus this loop is implemented as | ||
* assembler function. It's easier than convincing the compiler not to use any | ||
* stack for a C function. | ||
*/ | ||
.section .text | ||
BEGIN_FUNC(idle_thread) | ||
1: wfi | ||
j 1b | ||
END_FUNC(idle_thread) |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
/* | ||
* Copyright 2020, Data61, CSIRO (ABN 41 687 119 230) | ||
* Copyright 2021, Axel Heider <[email protected]> | ||
* | ||
* SPDX-License-Identifier: GPL-2.0-only | ||
*/ | ||
|
||
#include <machine/assembler.h> | ||
|
||
/* The idle thread does not have any stack, thus this loop is implemented as | ||
* assembler function. It's easier than convincing the compiler not to use any | ||
* stack for a C function. | ||
*/ | ||
.section ._idle_thread | ||
BEGIN_FUNC(idle_thread) | ||
1: hlt | ||
jmp 1b | ||
END_FUNC(idle_thread) |
This file was deleted.
Oops, something went wrong.