1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 03:17:35 +00:00
serenity/Userland/Libraries/LibPthread
Lenny Maiorani 800ea8ea96 Userland: static vs non-static constexpr variables
Problem:
- `static` variables consume memory and sometimes are less
  optimizable.
- `static const` variables can be `constexpr`, usually.
- `static` function-local variables require an initialization check
  every time the function is run.

Solution:
- If a global `static` variable is only used in a single function then
  move it into the function and make it non-`static` and `constexpr`.
- Make all global `static` variables `constexpr` instead of `const`.
- Change function-local `static const[expr]` variables to be just
  `constexpr`.
2021-05-21 10:07:06 +01:00
..
CMakeLists.txt LibC+LibPthread: Implement function forwarding for libpthread 2021-04-20 21:08:17 +02:00
forward.cpp Userland: static vs non-static constexpr variables 2021-05-21 10:07:06 +01:00
pthread.cpp Everywhere: Fix a bunch of typos 2021-05-17 17:48:55 +01:00
pthread.h LibC: Partially implement pthread_setcancel{state,type}() 2021-05-10 17:44:18 +01:00
pthread_once.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
semaphore.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
semaphore.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00