Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion code/comm.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@ MPMCOMMON = \
meter.c \
mpm.c \
mpsi.c \
mpsitr.c \
nailboard.c \
policy.c \
pool.c \
Expand All @@ -214,6 +215,7 @@ MPMCOMMON = \
trace.c \
traceanc.c \
tract.c \
trans.c \
tree.c \
version.c \
vm.c \
Expand Down Expand Up @@ -293,7 +295,8 @@ TEST_TARGETS=\
teletest \
walkt0 \
zcoll \
zmess
zmess \
ztfm

# This target records programs that we were once able to build but
# can't at the moment:
Expand Down Expand Up @@ -568,6 +571,9 @@ $(PFM)/$(VARIETY)/zcoll: $(PFM)/$(VARIETY)/zcoll.o \
$(PFM)/$(VARIETY)/zmess: $(PFM)/$(VARIETY)/zmess.o \
$(FMTDYTSTOBJ) $(TESTLIBOBJ) $(PFM)/$(VARIETY)/mps.a

$(PFM)/$(VARIETY)/ztfm: $(PFM)/$(VARIETY)/ztfm.o \
$(FMTDYTSTOBJ) $(TESTLIBOBJ) $(PFM)/$(VARIETY)/mps.a

$(PFM)/$(VARIETY)/mpseventcnv: $(PFM)/$(VARIETY)/eventcnv.o \
$(PFM)/$(VARIETY)/mps.a

Expand Down
3 changes: 0 additions & 3 deletions code/commpost.nmk
Original file line number Diff line number Diff line change
Expand Up @@ -219,9 +219,6 @@ $(PFM)\$(VARIETY)\btcv.exe: $(PFM)\$(VARIETY)\btcv.obj \
$(PFM)\$(VARIETY)\bttest.exe: $(PFM)\$(VARIETY)\bttest.obj \
$(PFM)\$(VARIETY)\mps.lib $(TESTLIBOBJ)

$(PFM)\$(VARIETY)\cvmicv.exe: $(PFM)\$(VARIETY)\cvmicv.obj \
$(PFM)\$(VARIETY)\mps.lib $(FMTTESTOBJ) $(TESTLIBOBJ)
Comment on lines -222 to -223
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cvmicv.c contains coverage tests for the CVM interface, since the code being tested is now all part of the mainline, should not these coverage tests be migrated as well?


$(PFM)\$(VARIETY)\djbench.exe: $(PFM)\$(VARIETY)\djbench.obj \
$(TESTLIBOBJ) $(TESTTHROBJ)

Expand Down
5 changes: 4 additions & 1 deletion code/commpre.nmk
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,8 @@ TEST_TARGETS=\
teletest.exe \
walkt0.exe \
zcoll.exe \
zmess.exe
zmess.exe \
ztfm.exe

# Stand-alone programs go in EXTRA_TARGETS if they should always be
# built, or in OPTIONAL_TARGETS if they should only be built if
Expand Down Expand Up @@ -145,6 +146,7 @@ MPMCOMMON=\
[meter] \
[mpm] \
[mpsi] \
[mpsitr] \
[nailboard] \
[policy] \
[pool] \
Expand All @@ -169,6 +171,7 @@ MPMCOMMON=\
[trace] \
[traceanc] \
[tract] \
[trans] \
[tree] \
[version] \
[vm] \
Expand Down
2 changes: 2 additions & 0 deletions code/mps.c
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@
#include "failover.c"
#include "vm.c"
#include "policy.c"
#include "trans.c"
#include "mpsitr.c"

/* Additional pool classes */

Expand Down
26 changes: 26 additions & 0 deletions code/mps.h
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,13 @@ typedef mps_addr_t (*mps_fmt_isfwd_t)(mps_addr_t);
typedef void (*mps_fmt_pad_t)(mps_addr_t, size_t);
typedef mps_addr_t (*mps_fmt_class_t)(mps_addr_t);

/* Callbacks indicating that the arena has extended or contracted.
* These are used to register chunks with RtlInstallFunctionTableCallback
* <https://docs.microsoft.com/en-gb/windows/win32/api/winnt/nf-winnt-rtlinstallfunctiontablecallback>
* so that the client can unwind the stack through functions in the arena.
*/
typedef void (*mps_arena_extended_t)(mps_arena_t, mps_addr_t, size_t);
typedef void (*mps_arena_contracted_t)(mps_arena_t, mps_addr_t, size_t);

/* Keyword argument lists */

Expand Down Expand Up @@ -171,6 +178,12 @@ extern const struct mps_key_s _mps_key_ARENA_SIZE;
extern const struct mps_key_s _mps_key_ARENA_ZONED;
#define MPS_KEY_ARENA_ZONED (&_mps_key_ARENA_ZONED)
#define MPS_KEY_ARENA_ZONED_FIELD b
extern const struct mps_key_s _mps_key_arena_extended;
#define MPS_KEY_ARENA_EXTENDED (&_mps_key_arena_extended)
#define MPS_KEY_ARENA_EXTENDED_FIELD fun
extern const struct mps_key_s _mps_key_arena_contracted;
#define MPS_KEY_ARENA_CONTRACTED (&_mps_key_arena_contracted)
#define MPS_KEY_ARENA_CONTRACTED_FIELD fun
extern const struct mps_key_s _mps_key_FORMAT;
#define MPS_KEY_FORMAT (&_mps_key_FORMAT)
#define MPS_KEY_FORMAT_FIELD format
Expand Down Expand Up @@ -247,6 +260,10 @@ extern const struct mps_key_s _mps_key_FMT_CLASS;
#define MPS_KEY_FMT_CLASS (&_mps_key_FMT_CLASS)
#define MPS_KEY_FMT_CLASS_FIELD fmt_class

extern const struct mps_key_s _mps_key_ap_hash_arrays;
#define MPS_KEY_AP_HASH_ARRAYS (&_mps_key_ap_hash_arrays)
#define MPS_KEY_AP_HASH_ARRAYS_FIELD b

/* Maximum length of a keyword argument list. */
#define MPS_ARGS_MAX 32

Expand Down Expand Up @@ -833,6 +850,15 @@ extern mps_res_t _mps_fix2(mps_ss_t, mps_addr_t *);
MPS_END


/* Transforms interface. */

typedef struct mps_transform_s *mps_transform_t;
extern mps_res_t mps_transform_create(mps_transform_t *, mps_arena_t);
extern mps_res_t mps_transform_add_oldnew(mps_transform_t, mps_addr_t *, mps_addr_t *, size_t);
extern mps_res_t mps_transform_apply(mps_bool_t *, mps_transform_t);
extern void mps_transform_destroy(mps_transform_t);


#endif /* mps_h */


Expand Down
124 changes: 124 additions & 0 deletions code/mps.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@
3114A6B9156E9763001E0AA3 /* PBXTargetDependency */,
31D60063156D3F5C00337B26 /* PBXTargetDependency */,
31D60087156D3FE600337B26 /* PBXTargetDependency */,
220FD3F419533E8F00967A35 /* PBXTargetDependency */,
3114A6D5156E9839001E0AA3 /* PBXTargetDependency */,
2265D72220E54020003019E8 /* PBXTargetDependency */,
2D07B9791636FCBD00DB751B /* PBXTargetDependency */,
Expand All @@ -131,6 +132,13 @@
/* End PBXAggregateTarget section */

/* Begin PBXBuildFile section */
220FD3DD195339C000967A35 /* fmtdy.c in Sources */ = {isa = PBXBuildFile; fileRef = 3124CAC6156BE48D00753214 /* fmtdy.c */; };
220FD3DE195339C000967A35 /* fmtdytst.c in Sources */ = {isa = PBXBuildFile; fileRef = 3124CAC7156BE48D00753214 /* fmtdytst.c */; };
220FD3DF195339C000967A35 /* fmthe.c in Sources */ = {isa = PBXBuildFile; fileRef = 3124CAE4156BE6D500753214 /* fmthe.c */; };
220FD3E1195339C000967A35 /* testlib.c in Sources */ = {isa = PBXBuildFile; fileRef = 31EEAC9E156AB73400714D05 /* testlib.c */; };
220FD3E3195339C000967A35 /* libmps.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 31EEABFB156AAF9D00714D05 /* libmps.a */; };
220FD3F119533E7200967A35 /* fmtno.c in Sources */ = {isa = PBXBuildFile; fileRef = 3124CACC156BE4C200753214 /* fmtno.c */; };
220FD3F219533E7900967A35 /* ztfm.c in Sources */ = {isa = PBXBuildFile; fileRef = 220FD3F019533C3200967A35 /* ztfm.c */; };
2215A9C9192A495F00E9E2CE /* pooln.c in Sources */ = {isa = PBXBuildFile; fileRef = 22FACEDE18880933000FDBC1 /* pooln.c */; };
2231BB5118CA97D8002D6322 /* testlib.c in Sources */ = {isa = PBXBuildFile; fileRef = 31EEAC9E156AB73400714D05 /* testlib.c */; };
2231BB5318CA97D8002D6322 /* libmps.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 31EEABFB156AAF9D00714D05 /* libmps.a */; };
Expand Down Expand Up @@ -349,6 +357,20 @@
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
220FD3DA195339C000967A35 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 31EEABDA156AAE9E00714D05 /* Project object */;
proxyType = 1;
remoteGlobalIDString = 31EEABFA156AAF9D00714D05;
remoteInfo = mps;
};
220FD3F319533E8F00967A35 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 31EEABDA156AAE9E00714D05 /* Project object */;
proxyType = 1;
remoteGlobalIDString = 220FD3D8195339C000967A35;
remoteInfo = ztfm;
};
2215A9AB192A47BB00E9E2CE /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 31EEABDA156AAE9E00714D05 /* Project object */;
Expand Down Expand Up @@ -1038,6 +1060,15 @@
/* End PBXContainerItemProxy section */

/* Begin PBXCopyFilesBuildPhase section */
220FD3E4195339C000967A35 /* CopyFiles */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = /usr/share/man/man1/;
dstSubfolderSpec = 0;
files = (
);
runOnlyForDeploymentPostprocessing = 1;
};
2231BB5418CA97D8002D6322 /* CopyFiles */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
Expand Down Expand Up @@ -1493,6 +1524,12 @@
/* Begin PBXFileReference section */
2213454C1DB0386600E14202 /* prmc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = prmc.h; sourceTree = "<group>"; };
2213454D1DB038D400E14202 /* prmcxc.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = prmcxc.c; sourceTree = "<group>"; };
220FD3E9195339C000967A35 /* ztfm */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = ztfm; sourceTree = BUILT_PRODUCTS_DIR; };
220FD3EA195339E500967A35 /* mpsitr.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = mpsitr.c; sourceTree = "<group>"; };
220FD3EB195339F000967A35 /* trans.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = trans.c; sourceTree = "<group>"; };
220FD3ED19533A8700967A35 /* mpscvm.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = mpscvm.h; sourceTree = "<group>"; };
220FD3EE19533A8700967A35 /* trans.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = trans.h; sourceTree = "<group>"; };
220FD3F019533C3200967A35 /* ztfm.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ztfm.c; sourceTree = "<group>"; };
2231BB5918CA97D8002D6322 /* locbwcss */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = locbwcss; sourceTree = BUILT_PRODUCTS_DIR; };
2231BB6718CA97DC002D6322 /* locusss */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = locusss; sourceTree = BUILT_PRODUCTS_DIR; };
2231BB6818CA9834002D6322 /* locbwcss.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = locbwcss.c; sourceTree = "<group>"; };
Expand Down Expand Up @@ -1808,6 +1845,14 @@
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
220FD3E2195339C000967A35 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
220FD3E3195339C000967A35 /* libmps.a in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
2231BB5218CA97D8002D6322 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
Expand Down Expand Up @@ -2394,6 +2439,7 @@
3114A6BA156E9768001E0AA3 /* walkt0.c */,
31D6005E156D3F4A00337B26 /* zcoll.c */,
31D6007B156D3FCC00337B26 /* zmess.c */,
220FD3F019533C3200967A35 /* ztfm.c */,
);
name = Tests;
sourceTree = "<group>";
Expand Down Expand Up @@ -2485,6 +2531,7 @@
223E796519EAB00B00DC26A6 /* sncss */,
22EA3F4520D2B0D90065F5B6 /* forktest */,
2265D71D20E53F9C003019E8 /* mpseventpy */,
220FD3E9195339C000967A35 /* ztfm */,
);
name = Products;
sourceTree = "<group>";
Expand Down Expand Up @@ -2539,7 +2586,9 @@
311F2F6517398B3B00C15B6A /* mpsacl.h */,
311F2F6617398B3B00C15B6A /* mpsavm.h */,
22FACEDB188808D5000FDBC1 /* mpscmfs.h */,
220FD3ED19533A8700967A35 /* mpscvm.h */,
31EEABF5156AAF7C00714D05 /* mpsi.c */,
220FD3EA195339E500967A35 /* mpsitr.c */,
311F2F6717398B3B00C15B6A /* mpsio.h */,
311F2F6817398B3B00C15B6A /* mpslib.h */,
311F2F6917398B3B00C15B6A /* mpstd.h */,
Expand Down Expand Up @@ -2583,6 +2632,8 @@
31EEAC1F156AB2B200714D05 /* traceanc.c */,
31EEAC0D156AB27B00714D05 /* tract.c */,
311F2F7A17398B8E00C15B6A /* tract.h */,
220FD3EB195339F000967A35 /* trans.c */,
220FD3EE19533A8700967A35 /* trans.h */,
310F5D7118B6675F007EFCBC /* tree.c */,
310F5D7218B6675F007EFCBC /* tree.h */,
31EEAC44156AB32500714D05 /* version.c */,
Expand Down Expand Up @@ -2667,6 +2718,24 @@
/* End PBXHeadersBuildPhase section */

/* Begin PBXNativeTarget section */
220FD3D8195339C000967A35 /* ztfm */ = {
isa = PBXNativeTarget;
buildConfigurationList = 220FD3E5195339C000967A35 /* Build configuration list for PBXNativeTarget "ztfm" */;
buildPhases = (
220FD3DB195339C000967A35 /* Sources */,
220FD3E2195339C000967A35 /* Frameworks */,
220FD3E4195339C000967A35 /* CopyFiles */,
);
buildRules = (
);
dependencies = (
220FD3D9195339C000967A35 /* PBXTargetDependency */,
);
name = ztfm;
productName = zmess;
productReference = 220FD3E9195339C000967A35 /* ztfm */;
productType = "com.apple.product-type.tool";
};
2231BB4C18CA97D8002D6322 /* locbwcss */ = {
isa = PBXNativeTarget;
buildConfigurationList = 2231BB5518CA97D8002D6322 /* Build configuration list for PBXNativeTarget "locbwcss" */;
Expand Down Expand Up @@ -3610,6 +3679,7 @@
3114A6AB156E9759001E0AA3 /* walkt0 */,
31D60053156D3F3500337B26 /* zcoll */,
31D60070156D3FBC00337B26 /* zmess */,
220FD3D8195339C000967A35 /* ztfm */,
3114A6C5156E9815001E0AA3 /* mpseventcnv */,
2265D71120E53F9C003019E8 /* mpseventpy */,
2D07B9701636FC9900DB751B /* mpseventsql */,
Expand Down Expand Up @@ -3695,6 +3765,19 @@
/* End PBXShellScriptBuildPhase section */

/* Begin PBXSourcesBuildPhase section */
220FD3DB195339C000967A35 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
220FD3F219533E7900967A35 /* ztfm.c in Sources */,
220FD3DD195339C000967A35 /* fmtdy.c in Sources */,
220FD3DE195339C000967A35 /* fmtdytst.c in Sources */,
220FD3DF195339C000967A35 /* fmthe.c in Sources */,
220FD3F119533E7200967A35 /* fmtno.c in Sources */,
220FD3E1195339C000967A35 /* testlib.c in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
2231BB4F18CA97D8002D6322 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
Expand Down Expand Up @@ -4202,6 +4285,16 @@
/* End PBXSourcesBuildPhase section */

/* Begin PBXTargetDependency section */
220FD3D9195339C000967A35 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = 31EEABFA156AAF9D00714D05 /* mps */;
targetProxy = 220FD3DA195339C000967A35 /* PBXContainerItemProxy */;
};
220FD3F419533E8F00967A35 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = 220FD3D8195339C000967A35 /* ztfm */;
targetProxy = 220FD3F319533E8F00967A35 /* PBXContainerItemProxy */;
};
2215A9AA192A47BB00E9E2CE /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = 3104AFF1156D37A0000A585A /* all */;
Expand Down Expand Up @@ -4695,6 +4788,27 @@
/* End PBXTargetDependency section */

/* Begin XCBuildConfiguration section */
220FD3E6195339C000967A35 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
PRODUCT_NAME = "$(TARGET_NAME)";
};
name = Debug;
};
220FD3E7195339C000967A35 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
PRODUCT_NAME = "$(TARGET_NAME)";
};
name = Release;
};
220FD3E8195339C000967A35 /* RASH */ = {
isa = XCBuildConfiguration;
buildSettings = {
PRODUCT_NAME = "$(TARGET_NAME)";
};
name = RASH;
};
2215A9AE192A47BB00E9E2CE /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
Expand Down Expand Up @@ -6103,6 +6217,16 @@
/* End XCBuildConfiguration section */

/* Begin XCConfigurationList section */
220FD3E5195339C000967A35 /* Build configuration list for PBXNativeTarget "ztfm" */ = {
isa = XCConfigurationList;
buildConfigurations = (
220FD3E6195339C000967A35 /* Debug */,
220FD3E7195339C000967A35 /* Release */,
220FD3E8195339C000967A35 /* RASH */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
2215A9AD192A47BB00E9E2CE /* Build configuration list for PBXAggregateTarget "testci" */ = {
isa = XCConfigurationList;
buildConfigurations = (
Expand Down
Loading