Gareth Rees
11b2de3519
Protgranularity is the same on all unixes, so only need one implementation.
...
Copied from Perforce
Change: 186761
ServerID: perforce.ravenbrook.com
2014-07-01 11:21:39 +01:00
Gareth Rees
ef7bb2c997
Catch-up merge from branch/2014-05-28/align to branch/2014-06-14/vm.
...
Copied from Perforce
Change: 186664
ServerID: perforce.ravenbrook.com
2014-06-17 15:52:16 +01:00
Gareth Rees
5fb05e31b6
Fix problems noted by dl in review < https://info.ravenbrook.com/mail/2014/06/17/13-35-38/0/ >.
...
Copied from Perforce
Change: 186662
ServerID: perforce.ravenbrook.com
2014-06-17 15:15:32 +01:00
Gareth Rees
e95af3fb0e
Store the vm descriptor in the vmarena and vmchunk structures.
...
Copied from Perforce
Change: 186624
ServerID: perforce.ravenbrook.com
2014-06-14 15:12:26 +01:00
Gareth Rees
8c3e5886b4
Vmpagesize now takes no arguments -- this avoids suggesting (incorrectly) that it might return a different value for each vm.
...
New function ProtGranularity returns the protection granularity of the operating system. (On all currently supported operating systems this is the same as the granularity of memory mapping returned by VMPageSuze, but it's important to separate these concepts.) MPMCheck asserts that the granularity of memory mapping is a multiple of the granularity of protection.
Client arena supports MPS_KEY_ARENA_GRAIN_SIZE.
Some of the test cases set the arena grain size.
Copied from Perforce
Change: 186588
ServerID: perforce.ravenbrook.com
2014-06-13 17:19:23 +01:00
Gareth Rees
7b9d33799e
Catch-up merge from master sources to branch/2014-03-25/ansi.
...
Copied from Perforce
Change: 185907
ServerID: perforce.ravenbrook.com
2014-04-30 16:51:30 +01:00
Gareth Rees
532cd901ac
Avoid strict aliasing warnings from gcc 4.8.
...
Copied from Perforce
Change: 185484
ServerID: perforce.ravenbrook.com
2014-04-12 21:44:18 +01:00
Gareth Rees
fb2443daaa
Fix the build for gcc on os x: gcc warns about the missing return in protcatchthread, but we don't want to add one because that would be unreachable code. so use __attribute__((__noreturn__)) instead.
...
Copied from Perforce
Change: 185461
ServerID: perforce.ravenbrook.com
2014-04-11 12:42:26 +01:00
Gareth Rees
643ab5a49a
Improve clarity of product configuration so that names more explicitly indicate what they do:
...
* CONFIG_POLL_NONE (because the user-visible consequence is that polling is no longer supported; was CONFIG_PROTECTION_NONE).
* DISABLE_LOCKS (was THREAD_SINGLE).
* DISABLE_SHIELD (was THREAD_SINGLE && PROTECTION_NONE)
* DISABLE_REMEMBERED_SET (was PROTECTION_NONE)
When the shield is disabled, ArenaLeave asserts that there are no busy traces, and ArenaPoll is a no-op.
By having functions implemented using the corresponding macro, we can avoid duplicated code, and avoid testing DISABLE_SHIELD in global.c.
Remove all remaining references to MPS_PROD_EPCORE.
Copied from Perforce
Change: 185176
ServerID: perforce.ravenbrook.com
2014-04-02 15:48:57 +01:00
Gareth Rees
bc3e284dd7
Avoid use of unreachable code in protcatchthread on os x.
...
Copied from Perforce
Change: 184478
ServerID: perforce.ravenbrook.com
2014-02-24 18:07:14 +00:00
Richard Brooksby
55906e2b58
Fixing up build for test platform xci3gc, broken by os x threads development.
...
Enabling amcssth and awlutth tests for all platforms, since I believe these were fixed by OS X threads development.
Copied from Perforce
Change: 183118
ServerID: perforce.ravenbrook.com
2013-07-17 16:49:31 +01:00
Richard Brooksby
839c44c698
Added note about why we don't check that we're the only exception port before sending a reply.
...
Copied from Perforce
Change: 183006
ServerID: perforce.ravenbrook.com
2013-07-11 16:22:52 +01:00
Richard Brooksby
fdab3a6795
Documentation and commentary clarifications in response to code review < https://info.ravenbrook.com/mail/2013/07/11/13-17-56/0/ >.
...
Copied from Perforce
Change: 182999
ServerID: perforce.ravenbrook.com
2013-07-11 15:44:19 +01:00
Gareth Rees
227f03cda5
Small fixes following review < https://info.ravenbrook.com/mail/2013/07/11/13-17-56/0/ >.
...
Copied from Perforce
Change: 182993
ServerID: perforce.ravenbrook.com
2013-07-11 14:17:17 +01:00
Richard Brooksby
0ebb152f41
Improving references to documentation and source code.
...
Copied from Perforce
Change: 182983
ServerID: perforce.ravenbrook.com
2013-07-10 14:12:46 +01:00
Richard Brooksby
6cfd6d75c9
Reducing unnecessary copying of thread states by passing a pointer to the state in the mutator fault context.
...
Copied from Perforce
Change: 182980
ServerID: perforce.ravenbrook.com
2013-07-05 17:43:14 +01:00
Richard Brooksby
b71af4dbe4
Fixing a couple of comments that are out of date.
...
Copied from Perforce
Change: 182932
ServerID: perforce.ravenbrook.com
2013-07-05 01:53:51 +01:00
Richard Brooksby
d7c130af26
Lots of tidying up, deleting unnecessary code, and adding documentation.
...
Copied from Perforce
Change: 182926
ServerID: perforce.ravenbrook.com
2013-07-05 00:36:13 +01:00
Richard Brooksby
b471aeb616
Registering exception handler for each thread, rather than the whole task.
...
This avoids the need to forward exception messages to the debugger, since we can reasonably insist that we're the first handler in the chain for each thread.
Copied from Perforce
Change: 182925
ServerID: perforce.ravenbrook.com
2013-07-04 22:58:34 +01:00
Richard Brooksby
d8504fb9bb
Minor tidying and improved documentation in the leader comment.
...
Copied from Perforce
Change: 182924
ServerID: perforce.ravenbrook.com
2013-07-04 22:11:55 +01:00
Richard Brooksby
8b701281b6
Fixing alloc_table in awlutth.c so that it doesn't allocate a bogus extra word. not sure how it got like this.
...
Copied from Perforce
Change: 182896
ServerID: perforce.ravenbrook.com
2013-07-02 19:18:16 +01:00
Richard Brooksby
7181701824
Initial implementation of mac os x protection exception handling using mach.
...
Some threading tests get quite a long way.
Copied from Perforce
Change: 182872
ServerID: perforce.ravenbrook.com
2013-06-29 01:22:42 +01:00
Richard Brooksby
8d7124929e
Thread scanning for mac os x / mach, and the start of thread exception handling.
...
Copied from Perforce
Change: 182834
ServerID: perforce.ravenbrook.com
2013-06-22 09:02:35 +01:00
Richard Kistruck
f8571df01a
Mps: (xcpp) replacing protxc.c with protix.c
...
Copied from Perforce
Change: 161967
ServerID: perforce.ravenbrook.com
2007-03-21 14:03:40 +00:00
David Jones
06cf27dcd2
Mps: oops. previous submit blatted over my dirty branch. must
...
have forgotten to p4 edit it.
Copied from Perforce
Change: 147632
ServerID: perforce.ravenbrook.com
2005-03-04 15:53:00 +00:00
David Jones
928cf1298f
Mps: implemented prot on os x.
...
Copied from Perforce
Change: 147629
ServerID: perforce.ravenbrook.com
2005-03-04 15:37:12 +00:00