-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Fix macOS and Windows shared mem wait for detach #7321
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
DennisOSRM
merged 5 commits into
Project-OSRM:master
from
MarcelloPerathoner:fix-shared-memory-macwin
Jan 13, 2026
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
e9c21d2
Fix macOS and Windows shared mem wait for detach
MarcelloPerathoner 8259b24
Make struct compatible, use short id
MarcelloPerathoner 779ab26
Make struct compatible, use short id
MarcelloPerathoner 3c9682b
throw on error
MarcelloPerathoner 8bc6e77
WIP
MarcelloPerathoner File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -2,15 +2,12 @@ | |||||
| #define SHARED_DATA_TYPE_HPP | ||||||
|
|
||||||
| #include "storage/block.hpp" | ||||||
| #include "storage/io_fwd.hpp" | ||||||
|
|
||||||
| #include "util/exception.hpp" | ||||||
| #include "util/exception_utils.hpp" | ||||||
|
|
||||||
| #include <array> | ||||||
| #include <cstdint> | ||||||
| #include <map> | ||||||
| #include <numeric> | ||||||
| #include <unordered_set> | ||||||
|
|
||||||
| namespace osrm::storage | ||||||
|
|
@@ -67,10 +64,7 @@ class BaseDataLayout | |||||
| return GetBlock(name).byte_size; | ||||||
| } | ||||||
|
|
||||||
| inline bool HasBlock(const std::string &name) const | ||||||
| { | ||||||
| return blocks.find(name) != blocks.end(); | ||||||
| } | ||||||
| inline bool HasBlock(const std::string &name) const { return blocks.contains(name); } | ||||||
|
|
||||||
| // Depending on the name prefix this function either lists all blocks with the same prefix | ||||||
| // or all entries in the sub-directory. | ||||||
|
|
@@ -192,13 +186,19 @@ class TarDataLayout final : public BaseDataLayout | |||||
| } | ||||||
| }; | ||||||
|
|
||||||
| // The second parameter passed to ftok(). See: man 3 ftok | ||||||
| // It should actually be an int, but for compatibility with earlier versions of OSRM it | ||||||
| // is an uint16. It should't matter since, according to the man page, only the lowest 8 | ||||||
|
||||||
| // is an uint16. It should't matter since, according to the man page, only the lowest 8 | |
| // is an uint16. It shouldn't matter since, according to the man page, only the lowest 8 |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The change from
blocks.find(name) != blocks.end()toblocks.contains(name)requires C++20. Ensure that the project's minimum C++ standard is set to C++20 or this will cause compilation errors on older standards.