FreeCalypso > hg > gsm-codec-lib
comparison libgsmefr/tls_flags.c @ 38:38326102fc43
libgsmefr: beginning to integrate code from ETSI
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Thu, 24 Nov 2022 05:30:03 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
37:b4db5366b595 | 38:38326102fc43 |
---|---|
1 /* | |
2 * Unfortunately the code we got from ETSI makes heavy use of two global | |
3 * Boolean flags named Carry and Overflow that function like equally named | |
4 * processor state flags on many CPU architectures. They are not part | |
5 * of persistent codec session state for either the encoder or the decoder, | |
6 * instead they are "short-term" globals much like UNIX errno. | |
7 * | |
8 * Given this unfortunate reality plus the natural desire to make our | |
9 * EFR library thread-safe (a transcoding MGW handling a large volume of | |
10 * simultaneous calls is exactly the kind of application that would benefit | |
11 * from utilitizing all CPU cores), our current workaround is to use | |
12 * thread-local storage. | |
13 */ | |
14 | |
15 #include <stdint.h> | |
16 #include "typedef.h" | |
17 | |
18 __thread Flag EFR__Carry, EFR__Overflow; |