-
Notifications
You must be signed in to change notification settings - Fork 238
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
69 changed files
with
2,852 additions
and
383 deletions.
There are no files selected for viewing
This file contains 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 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 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 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 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 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 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 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 |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/* | ||
* The Shadow Simulator | ||
* See LICENSE for licensing information | ||
*/ | ||
// clang-format off | ||
|
||
|
||
#ifndef main_opaque_bindings_h | ||
#define main_opaque_bindings_h | ||
|
||
/* Warning, this file is autogenerated by cbindgen. Don't modify this manually. */ | ||
|
||
// A queue of byte chunks. | ||
typedef struct ByteQueue ByteQueue; | ||
|
||
typedef struct CompatDescriptor CompatDescriptor; | ||
|
||
// Manages the address-space for a plugin process. | ||
// | ||
// The MemoryManager's primary purpose is to make plugin process's memory directly accessible to | ||
// Shadow. It does this by tracking what regions of program memory in the plugin are mapped to | ||
// what (analagous to /proc/<pid>/maps), and *remapping* parts of the plugin's address space into | ||
// a shared memory-file, which is also mapped into Shadow. | ||
// | ||
// Shadow provides several methods for allowing Shadow to access the plugin's memory, such as | ||
// `get_readable_ptr`. If the corresponding region of plugin memory is mapped into the shared | ||
// memory file, the corresponding Shadow pointer is returned. If not, then, it'll fall back to | ||
// (generally slower) Thread APIs. | ||
// | ||
// For the MemoryManager to maintain consistent state, and to remap regions of memory it knows how | ||
// to remap, Shadow must delegate handling of mman-related syscalls (such as `mmap`) to the | ||
// MemoryManager via its `handle_*` methods. | ||
typedef struct MemoryManager MemoryManager; | ||
|
||
// An opaque type used when passing `*const AtomicRefCell<File>` to C. | ||
typedef struct PosixFileArc PosixFileArc; | ||
|
||
#endif /* main_opaque_bindings_h */ |
This file contains 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 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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
language = 'C' | ||
include_guard = "main_opaque_bindings_h" | ||
line_length = 100 | ||
documentation_style = "c99" | ||
header = '''/* | ||
* The Shadow Simulator | ||
* See LICENSE for licensing information | ||
*/ | ||
// clang-format off | ||
''' | ||
autogen_warning = "/* Warning, this file is autogenerated by cbindgen. Don't modify this manually. */" | ||
no_includes = true | ||
|
||
[export] | ||
# Avoid exporting C types back through again. | ||
exclude = ["PluginPtr", "SysCallReg"] | ||
# Generate only opaque types | ||
item_types = ["opaque"] |
This file contains 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 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 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
Oops, something went wrong.