Files
rustdesk/src
Saverio Miroddi 7f50fe3ea0 Remove KEYBOARD_HOOKED unsafe code, by using AtomicBool
For supported types, static R/W globals unsafe code can be replaced by safe `Atomic*` types.

The pattern of usage is simple:

- AtomicBool#swap is used to fetch the old `KEYBOARD_HOOKED` value, while setting it to true;
- if the old value was true, there is effectively no change to `KEYBOARD_HOOKED`, and the flow exits from the enclosing function;
- if the old value was false, execute the function (the new `KEYBOARD_HOOKED` has been set to true by swap()).

The most conservative ordering is used, as the context is not performance-sensitive.

Atomics are not supported on every platform, but the project assumes x86-64, which supports them.
2022-05-22 18:48:08 +02:00
..
2022-05-20 00:22:43 +08:00
2022-05-22 10:49:37 +03:00
2022-05-18 16:12:50 +08:00
2022-05-19 18:39:13 +08:00
2022-05-12 17:35:25 +08:00
2022-05-20 00:11:48 +08:00
2022-02-24 11:32:14 +08:00
2022-05-12 17:35:25 +08:00
2022-05-16 14:45:17 +08:00
2022-05-13 21:38:49 +08:00
2022-05-14 17:02:31 +08:00
2022-05-16 14:45:17 +08:00
2022-05-20 09:28:46 +08:00
2022-05-13 20:31:44 +08:00
2022-05-12 17:55:49 +08:00
2022-05-12 17:55:49 +08:00
2022-05-12 17:35:25 +08:00
2022-05-12 17:35:25 +08:00
2022-05-12 17:35:25 +08:00
2022-05-12 17:35:25 +08:00
2022-05-12 17:35:25 +08:00
2022-05-13 18:10:32 +08:00
2022-05-12 17:35:25 +08:00