Skip to content

Commit 20737ac

Browse files
adriwebcalc84maniac
authored andcommitted
arm: use TinyCThread as fallback if C11 <threads.h> is not available.
1 parent 0619e0a commit 20737ac

File tree

10 files changed

+1502
-5
lines changed

10 files changed

+1502
-5
lines changed

LICENSE

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ Portions of this program use code, directly or modified, from:
1818

1919
CEmu also uses the APNG-enabled fork of libpng (https://sourceforge.net/projects/libpng-apng/) released under the zlib/libpng License.
2020

21+
If the C11 <threads.h> is not available, CEmu uses gyrovorbis' TinyCThread fork (https://github.com/gyrovorbis/tinycthread) released under the zlib License.
22+
2123
________________________________________________________
2224
z80e license:
2325

@@ -59,3 +61,30 @@ KDMacTouchBar license:
5961
GNU LESSER GENERAL PUBLIC LICENSE Version 3
6062
See here: https://github.com/KDAB/KDMacTouchBar/blob/master/LICENSE.LGPL.txt
6163

64+
65+
________________________________________________________
66+
TinyCThread license:
67+
68+
Copyright (c) 2012 Marcus Geelnard
69+
Copyright (c) 2013-2016 Evan Nemerson
70+
71+
This software is provided 'as-is', without any express or implied
72+
warranty. In no event will the authors be held liable for any damages
73+
arising from the use of this software.
74+
75+
Permission is granted to anyone to use this software for any purpose,
76+
including commercial applications, and to alter it and redistribute it
77+
freely, subject to the following restrictions:
78+
79+
1. The origin of this software must not be misrepresented; you must not
80+
claim that you wrote the original software. If you use this software
81+
in a product, an acknowledgment in the product documentation would be
82+
appreciated but is not required.
83+
84+
2. Altered source versions must be plainly marked as such, and must not be
85+
misrepresented as being the original software.
86+
87+
3. This notice may not be removed or altered from any source
88+
distribution.
89+
90+
SPDX-License-Identifier: Zlib

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,5 +84,5 @@ We also welcome more translations. Qt Linguist is a great tool for that (here's
8484

8585
## License
8686
CEmu is licensed under the [GPLv3](LICENSE).
87-
_Acknowledgements_: Some CEmu parts are, directly, modified, or inspired, from [z80e](https://github.com/KnightOS/z80e), [Firebird](https://github.com/nspire-emus/firebird), [libtifiles](https://github.com/debrouxl/tilibs), [tivars_lib_cpp](https://github.com/adriweb/tivars_lib_cpp), [KDMacTouchBar](https://github.com/KDAB/KDMacTouchBar), and FatCow's ["Farm-Fresh Web Icons"](http://www.fatcow.com/free-icons).
87+
_Acknowledgements_: Some CEmu parts are, directly, modified, or inspired, from [z80e](https://github.com/KnightOS/z80e), [Firebird](https://github.com/nspire-emus/firebird), [libtifiles](https://github.com/debrouxl/tilibs), [tivars_lib_cpp](https://github.com/adriweb/tivars_lib_cpp), [KDMacTouchBar](https://github.com/KDAB/KDMacTouchBar), [TinyCThread](https://github.com/gyrovorbis/tinycthread) (_gyrovorbis_'s fork), and FatCow's ["Farm-Fresh Web Icons"](http://www.fatcow.com/free-icons).
8888
The complete licensing information is available in the [LICENSE](LICENSE) file.

core/arm/armmem.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
#include <stddef.h>
1313
#include <stdint.h>
1414
#include <stdio.h>
15-
#include <threads.h>
15+
#include "threading.h"
1616

1717
typedef struct {
1818
__IO PM_CTRL_Type CTRL; /**< \brief Offset: 0x00 (R/W 8) Control */

core/arm/armstate.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
#include "sync.h"
99

1010
#include <stdbool.h>
11-
#include <threads.h>
11+
#include "threading.h"
1212

1313
struct arm {
1414
sync_t sync;

core/arm/spscqueue.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#include <stdatomic.h>
55
#include <stdbool.h>
66
#include <stdint.h>
7-
#include <threads.h>
7+
#include "threading.h"
88

99
#ifdef __cplusplus
1010
extern "C" {

core/arm/sync.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
#include <stdatomic.h>
55
#include <stdbool.h>
6-
#include <threads.h>
6+
#include "threading.h"
77

88
#ifdef __cplusplus
99
extern "C" {

core/arm/threading.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#ifdef HAVE_C11_THREADS
2+
#include <threads.h>
3+
#else
4+
#include "tinycthread.h"
5+
#endif

0 commit comments

Comments
 (0)