Gareth Rees
73fa242bb1
Improve documentation of thread- and exception-safety precautions.
...
Copied from Perforce
Change: 183635
ServerID: perforce.ravenbrook.com
2013-11-04 15:14:47 +00:00
Gareth Rees
ba0e8c1b8b
Put testsetsize back to its original value of 200, so that randomsizealigned does not invoke undefined behaviour by right-shifting by more than the word width.
...
Copied from Perforce
Change: 183617
ServerID: perforce.ravenbrook.com
2013-10-31 09:39:09 +00:00
Gareth Rees
8f9423a8c3
Add comments and assertions to make it clearer how btfindresrange and btfindresrangehigh work. in particular, explain why the possible unsigned integer underflow in btfindresrangehigh is safe.
...
Copied from Perforce
Change: 183613
ServerID: perforce.ravenbrook.com
2013-10-30 15:53:19 +00:00
Gareth Rees
b87ce7680f
Don't call mvtsegfree from mvtfinish: we don't know whether or not there was any fragmented (unavailable) space in this segment, and so we can't keep the accounting correct. add assertion in mvtsegfree that detects incorrect accounting.
...
Copied from Perforce
Change: 183610
ServerID: perforce.ravenbrook.com
2013-10-30 13:15:09 +00:00
Gareth Rees
73350475ed
The next release of the mps will be 1.112.0, so update version.c.
...
Update the version creating procedure: version.c is now the only file containing the release number.
Copied from Perforce
Change: 183548
ServerID: perforce.ravenbrook.com
2013-10-10 14:29:31 +01:00
Gareth Rees
5824d8a73f
Improve wording of comment.
...
Copied from Perforce
Change: 183526
ServerID: perforce.ravenbrook.com
2013-10-04 11:50:19 +01:00
Gareth Rees
d2c28e7deb
Fix broken mps_key_pool_debug_options keyword argument.
...
Copied from Perforce
Change: 183524
ServerID: perforce.ravenbrook.com
2013-10-04 11:05:56 +01:00
Gareth Rees
e522a0b273
Document that you can specify mps_key_rank when creating an allocation point on an ams pool. make mps_key_rank default to mps_rank_exact().
...
Copied from Perforce
Change: 183515
ServerID: perforce.ravenbrook.com
2013-10-02 15:44:34 +01:00
Gareth Rees
692489dd2b
Make keyword mps_key_ams_support_ambiguous optional, with default value false. update documentation accordingly.
...
Copied from Perforce
Change: 183513
ServerID: perforce.ravenbrook.com
2013-10-02 15:14:57 +01:00
Gareth Rees
fab773659d
Use macro nonnegative so that we can keep asserting that values are >= 0 without provoking "unsigned comparison >= 0 is always true" warnings from gcc.
...
Copied from Perforce
Change: 183505
ServerID: perforce.ravenbrook.com
2013-10-01 14:27:52 +01:00
Gareth Rees
544a160559
Merge branch/2013-08-21/lii6ll/... into the master sources, adding new supported platform lii6ll (linux, x86-64, clang/llvm).
...
Copied from Perforce
Change: 183503
ServerID: perforce.ravenbrook.com
2013-10-01 14:04:36 +01:00
Gareth Rees
51a97f1c37
Avoid comparison of unsigned >= 0 so that we can compile without warnings under gcc -wextra.
...
Copied from Perforce
Change: 183501
ServerID: perforce.ravenbrook.com
2013-10-01 11:10:59 +01:00
Gareth Rees
af06b04a77
Raise an error if variety is something other than rash, hot, or cool.
...
Copied from Perforce
Change: 183499
ServerID: perforce.ravenbrook.com
2013-10-01 10:53:09 +01:00
Gareth Rees
949578bac4
Avoid warnings when compiling with -wwrite-strings:
...
* Use const char * in places where we want to assign string constants.
Avoid warnings when compiling with -Wextra:
* Avoid if statement with empty body in amcsshe.c
* Avoid comparison of unsigned >= 0.
Copied from Perforce
Change: 183498
ServerID: perforce.ravenbrook.com
2013-10-01 10:52:45 +01:00
Gareth Rees
a3c7ed0cab
Turn on -wextra -wwrite-strings when compiling with gcc or clang.
...
Add missing initializer to mps_args_none.
Change "char *" to "const char *" where necessary.
Copied from Perforce
Change: 183494
ServerID: perforce.ravenbrook.com
2013-09-30 17:18:52 +01:00
Gareth Rees
b59ba75674
New supported platform lii6ll (linux, x86-64, clang/llvm).
...
Copied from Perforce
Change: 183414
ServerID: perforce.ravenbrook.com
2013-09-11 10:27:22 +01:00
Gareth Rees
1d39ec5b87
Make the mps compilable under clang/llvm 3.0 with the -ansi -pedantic options:
...
Avoid if with empty body by adding NOOP.
Avoid extended offsetof in expansion of PageOfTract, linkOfMessage, linkOfRing, and Pool2AMST macros.
Copied from Perforce
Change: 183413
ServerID: perforce.ravenbrook.com
2013-09-11 10:21:12 +01:00
Gareth Rees
7bc31bced8
Don't detect the compiler as gcc when it's actually clang. emit an error instead.
...
Copied from Perforce
Change: 183334
ServerID: perforce.ravenbrook.com
2013-08-20 17:10:36 +01:00
Richard Brooksby
35dd801372
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
086ad82475
Removing false comment about multiple thread registration, but see job003559.
...
Copied from Perforce
Change: 183114
ServerID: perforce.ravenbrook.com
2013-07-17 14:38:05 +01:00
Gareth Rees
7bfa2a3cac
Fix typo: "ldisstaleany" for "ldisstale".
...
Copied from Perforce
Change: 183102
ServerID: perforce.ravenbrook.com
2013-07-17 10:11:28 +01:00
Gareth Rees
91c2d03744
Prot_siginfo_good and prot_signal are no longer needed on os x.
...
Copied from Perforce
Change: 183101
ServerID: perforce.ravenbrook.com
2013-07-17 10:10:57 +01:00
Richard Brooksby
c012d80766
Fixing sacss failure introduced in changelist 183045. alignments are unpacked from varargs as promoted to size_t, but mps_pf_align is a naked number literal, and so was passed as int, causing a corrupt alignemnt failure in sacss.
...
Copied from Perforce
Change: 183048
ServerID: perforce.ravenbrook.com
2013-07-15 17:24:55 +01:00
Gareth Rees
6cedb9d2dc
Correct pass_count to fail_count in testrun.bat.
...
locbwcss shouldn't fail if there are non-contiguous allocations. Those are perfectly legitimate (MVFF uses CBS, which needs to allocate nodes in its splay tree).
Copied from Perforce
Change: 183047
ServerID: perforce.ravenbrook.com
2013-07-15 17:09:39 +01:00
Gareth Rees
f58f428605
Three test cases assumed that mps_pf_align is always equal to sizeof(void *), but this isn't true on platform w3i3mv where sizeof(void *) is 4 and mps_pf_align is 8. remove the assumption from these test cases.
...
Copied from Perforce
Change: 183045
ServerID: perforce.ravenbrook.com
2013-07-15 16:54:10 +01:00
Gareth Rees
0a7c50fdfa
Avoid calling abort() on windows when running the test suite, so that the test suite doesn't get suspended waiting for someone to press a button.
...
Copied from Perforce
Change: 183041
ServerID: perforce.ravenbrook.com
2013-07-15 15:37:22 +01:00
Richard Brooksby
b873e52ac0
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
08c7ce947c
Adding missing #endif caused by merge error. oops.
...
Copied from Perforce
Change: 183004
ServerID: perforce.ravenbrook.com
2013-07-11 16:08:42 +01:00
Richard Brooksby
1cd1480122
Merging branch/2013-06-18/macosx-threads back to master.
...
Copied from Perforce
Change: 183002
ServerID: perforce.ravenbrook.com
2013-07-11 15:55:58 +01:00
Richard Brooksby
4a36041494
Adding awlutth to regular test cases on os x.
...
Copied from Perforce
Change: 183000
ServerID: perforce.ravenbrook.com
2013-07-11 15:53:59 +01:00
Richard Brooksby
1772a17e72
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
f19d112a1a
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
Gareth Rees
f8c90b565e
Changes from review < https://info.ravenbrook.com/mail/2013/07/10/14-38-35/0/ >.
...
Copied from Perforce
Change: 182986
ServerID: perforce.ravenbrook.com
2013-07-10 15:37:27 +01:00
Richard Brooksby
905c983569
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
01d17882e6
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
Bruce Mitchener
9e2eef4fa0
Don't define _gnu_source if already defined.
...
When using the build method of including the MPS directly into
one's own sources, that build system may already define _GNU_SOURCE
causing a warning here about re-defining it.
Copied from Perforce
Change: 182941
ServerID: perforce.ravenbrook.com
2013-07-05 10:21:50 +01:00
Richard Brooksby
ec0739c878
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
09b3808c9e
Catch-up merge from master to macosx-threads branch.
...
Copied from Perforce
Change: 182928
ServerID: perforce.ravenbrook.com
2013-07-05 00:56:22 +01:00
Richard Brooksby
a4b67cf92a
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
30e439b2c5
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
2241ede47d
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
cf0a17c78f
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
5a25854918
Fixing minor linux build error left over from dl's debugging.
...
Copied from Perforce
Change: 182884
ServerID: perforce.ravenbrook.com
2013-07-01 20:51:21 +01:00
Richard Brooksby
79582c17db
Amcssth test was broken: didn't register the worker threads as roots, only created one worker thread, registered it twice. weird.
...
Copied from Perforce
Change: 182882
ServerID: perforce.ravenbrook.com
2013-07-01 20:04:30 +01:00
Gareth Rees
a86c3e469e
No need to compile arg.c separately: included in mps.c since change 181994.
...
Copied from Perforce
Change: 182877
ServerID: perforce.ravenbrook.com
2013-07-01 11:23:59 +01:00
Richard Brooksby
96448d34a9
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
512dca47e2
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 Brooksby
ac028a5fd0
Mutator fault context definitions for os x using mach.
...
Copied from Perforce
Change: 182832
ServerID: perforce.ravenbrook.com
2013-06-22 00:54:50 +01:00
Richard Brooksby
c1e5ec8f38
Implementing os x (mach) threading module.
...
Copied from Perforce
Change: 182830
ServerID: perforce.ravenbrook.com
2013-06-21 23:57:07 +01:00
Gareth Rees
e88bcc5184
Document the intention behind mps_ld_isstale rather than the implementation: it captures the intention of testing whether a particular dependency is stale (even though the implementation in fact tests whether any dependency is stale). add new function mps_ls_isstale_any for expressing the intention of testing whether any dependencey is stale. the two functions have the same implementation at present, but the separation gives us the freedom to return a more precise result from mps_ld_isstale in future.
...
Copied from Perforce
Change: 182816
ServerID: perforce.ravenbrook.com
2013-06-20 16:25:08 +01:00