Nekotekina
6e497ae372
vm: disable sparse files on win7
2021-05-18 13:31:46 +03:00
Nekotekina
2a26bc6668
Fix page mapping rights to file mapping
2021-05-13 13:49:24 +03:00
Nekotekina
f0ad20a250
Implement const_str_t<> helper
2021-05-13 10:23:33 +03:00
Nekotekina
126141cdce
vm_native: improve sparse file handling
...
Don't specify O_TRUNC every time.
Add portable support test (Linux/Unix).
Use PAGE_WRITECOPY (Windows).
2021-05-13 10:23:33 +03:00
Nekotekina
0bd64a0e72
Don't fatal on sparse file initialization failure
...
Also try two different locations (Win32).
2021-05-10 00:39:28 +03:00
Nekotekina
327c000c82
Implement s128 type (based on u128)
2021-05-04 18:02:52 +03:00
Nekotekina
1b0b2fe21e
vm: add "hook" memory (32G)
...
Implement overcommit emulation for shm.
2021-05-04 18:02:52 +03:00
Nekotekina
e327d47169
vm_native: add cow flag to map functions
...
CoW is copy-on-write mapping type.
2021-05-04 09:53:19 +03:00
Nekotekina
3fc6375ec5
Use consteval (experimental)
2021-04-29 23:16:43 +03:00
Nekotekina
f8e05f8e3c
Remove redundant operators !=
2021-04-29 22:57:40 +03:00
Nekotekina
5724d2d4c7
Simplify umax
...
Add operator less and conversion operator.
2021-04-29 12:21:12 +03:00
Nekotekina
b1736b6411
Simplify utils::umulh64 (MSVC)
2021-04-29 09:45:57 +03:00
Nekotekina
4d9a167f56
u128: add multiplication support (for MSVC)
2021-04-25 18:17:38 +03:00
Nekotekina
b704cc8375
shared_ptr.hpp: implement make_single_value(), make_shared_value()
...
A function that constructs single_ptr from its argument.
Type can be deduced from the argument (unlike make_single).
2021-04-25 18:17:38 +03:00
Nekotekina
e34c956196
shared_ptr.hpp: add invoke operator
2021-04-25 18:17:38 +03:00
Nekotekina
0c9c481cee
Use requires syntax in more places
...
Change style in some places.
2021-04-19 16:51:40 +03:00
Nekotekina
7dae376646
Implement fill_array() utility
2021-04-19 12:33:32 +03:00
David Carlier
b6732fbae9
MacOs build fix proposal.
...
Made on Big Sur, removing few unnecessary old specifics.
Build with LLVM homebrew.
2021-04-18 17:18:09 +03:00
Nekotekina
7a9561b966
vm_native: document some unmap_critical behaviour (posix)
2021-04-18 13:13:15 +03:00
Nekotekina
c061991c43
vm_native: supply only one madvise flag at a time
2021-04-18 13:13:15 +03:00
David Carlier
266c4209c4
VM: FreeBSD c_madv_no_dump/dump constants support.
2021-04-17 20:47:36 +03:00
Eladash
67e2e154fa
Replace simple_type with std::common_type
2021-04-17 10:27:55 +03:00
Nekotekina
408ffd3d2c
fxo: add debug name to the typeinfo
2021-04-15 20:01:29 +03:00
Nekotekina
a211895e28
shared_ptr.hpp: use for fs::virtual_device
...
Add new constructors for single_ptr and shared_ptr.
Change virtual device prefix format.
2021-04-15 17:26:47 +03:00
p01arst0rm
c9d2aed286
small collection of fixes
2021-04-15 11:05:15 +03:00
Megamouse
a16d8ba3ea
More random changes
2021-04-11 14:01:51 +03:00
Nekotekina
8c5f2b249c
shared_ptr.hpp: further fixes
...
Improved is_same_ptr() trait (added third "maybe" category).
Fallback to pseudo-runtime check in certain cases (if "maybe").
Fix single_ptr moving assignment operator.
2021-04-09 10:26:13 +03:00
Nekotekina
332c512eed
shared_ptr.hpp: minor optimization (GCC hotfix)
...
Use thread_local for dummy objects (doesn't work on MSVC).
Couldn't find better way to remove fake static objects completely.
In a sense that they don't appear in object files.
2021-04-09 10:26:13 +03:00
Nekotekina
94c62b1eec
shared_ptr.hpp: improve is_same_ptr<> trait
...
Don't always return true on MSVC.
2021-04-08 10:29:47 +03:00
Nekotekina
963d150e93
Fix some -Weffc++ warnings (part 2)
2021-04-03 21:54:15 +03:00
Nekotekina
2212a131ef
Fix some -Weffc++ warnings (part 1)
2021-03-31 11:27:09 +03:00
Nekotekina
729757b1dd
atomic.hpp: allow raw notify_all by pointer
2021-03-23 20:58:42 +03:00
Nekotekina
393f9d329d
atomic.cpp: allow non-standard sizes in atomic wait (>16)
2021-03-23 20:52:56 +03:00
Nekotekina
820390b7ed
atomic.cpp: remove raw_notify and simplify internal logic
...
Also permit zero size in waiters.
2021-03-23 20:19:10 +03:00
Eladash
cd6ef2958b
Add information about unnamed/main threads in logs and fatal dialog
...
* If thread is unnamed, keep log name empty for main thread, otherwise print thread id. In fatal dialog, main thread can be handled differently (with special remark that it's main thread).
* Always print thread id in fatal dialog, regardless of thread type.
Co-authored-by: Nekotekina <nekotekina@gmail.com>
2021-03-11 22:55:06 +03:00
Nekotekina
03332c340d
Implement utils::bless (pointer cast)
...
Tries to workaround strict aliasing troubles.
Don't confuse with std::bless which works differently.
2021-03-10 16:02:00 +03:00
Nekotekina
a4fdbf0a88
Enable -Wstrict-aliasing=1 (GCC)
...
Fixed partially.
2021-03-09 03:10:15 +03:00
Nekotekina
5bdd1cf837
Remove some redundant code
...
Potential fix for future warnings.
2021-03-09 03:09:50 +03:00
Nekotekina
ded828dfc9
sysinfo.cpp: Implement utils::main_tid (main thread id)
...
Careful.
2021-03-06 23:10:31 +03:00
Nekotekina
87af905018
Enable -Wunused-parameter
2021-03-06 18:07:08 +03:00
Eladash
228988ca2b
Fix utils::get_firmware_version()
...
* Do not crash on invalid file contents.
* Do not crash on unexpected file.open() error.
2021-03-06 14:53:40 +03:00
Nekotekina
e6a3b59229
endian.hpp: simplify be_t/le_t constructors
2021-03-03 17:37:51 +03:00
Nekotekina
52fe86b56c
fixed_typemap.hpp: make it a bit fool-proof
...
Require objects to be non-copyable (move is still allowed).
2021-03-02 21:58:49 +03:00
Nekotekina
ea5e837bd6
fixed_typemap.hpp: return reference
2021-03-02 16:08:14 +03:00
Nekotekina
bbf52f3cea
named_thread: fix bugs in std::forward usage
...
Fix few misused threads and other bugs.
2021-03-02 16:08:14 +03:00
Nekotekina
d788b12a8e
fixed_typemap.hpp: reduce indirection
...
Backported some changes from auto_typemap.hpp
Implemented methods init(), reset(), clear()
Disabled recreation support.
2021-03-02 16:08:14 +03:00
Nekotekina
8a9320c4ef
auto_typemap.hpp: reduce indirection
...
Implement is_init() method.
Implement optional Size template arg for further optimization.
2021-03-02 16:08:14 +03:00
Nekotekina
5cc9bd7702
typeindices.hpp: upgrade with size and align info
...
This allows contiguous allocation (as in an aggregate).
2021-03-02 16:08:14 +03:00
Nekotekina
aa7e2376ec
shared_ptr.hpp: minor fixup for arrays
2021-03-02 16:08:14 +03:00
Nekotekina
71e16bfac3
shared_ptr.hpp: minor fixup
2021-03-01 00:28:28 +03:00