Mark Mentovai
8c7872e9e0
Use the correct null constants for Mach threads, tasks, and hosts.
...
This uses THREAD_NULL, TASK_NULL, and HOST_NULL in preference to
MACH_PORT_NULL and kMachPortNull. These constants are correctly-typed
(thread_t, task_t, and host_t) and result in more readable source code,
especially where thread and task parameters appear together as they do
in exc_*_variants.
TEST=util_test
R=rsesek@chromium.org
Review URL: https://codereview.chromium.org/649713002
2014-10-13 12:59:21 -04:00
Mark Mentovai
6d1af6922f
Don’t use using directives (“using namespace”) in tests.
...
The contents of tests are moved into the namespace
crashpad::test::(anonymous namespace).
https://google-styleguide.googlecode.com/svn/trunk/cppguide.html#Namespaces
R=rsesek@chromium.org
Review URL: https://codereview.chromium.org/635883002
2014-10-07 17:28:50 -04:00
Mark Mentovai
b7a1070335
Add Semaphore and its test, and use it where semaphores are needed.
...
TEST=util_test Semaphore.*:ProcessReader.*:ExceptionPorts.*
R=rsesek@chromium.org
Review URL: https://codereview.chromium.org/589243003
2014-09-24 13:32:31 -04:00
Mark Mentovai
eeaf460f82
Add and use CheckedReadFD(), CheckedWriteFD(), and CheckedReadFDAtEOF().
...
TEST=util_test
R=rsesek@chromium.org
Review URL: https://codereview.chromium.org/577333002
2014-09-18 15:03:49 -04:00
Mark Mentovai
3f2ba965f5
Use ExcServerSuccessfulReturnValue() in one spot that was missed in
...
57eb311528f2.
R=rsesek@chromium.org
Review URL: https://codereview.chromium.org/575243002
2014-09-17 18:09:05 -04:00
Mark Mentovai
b4fe6dfae0
Refactor EXC_CRASH code[0] processing into a new function,
...
ExcCrashRecoverOriginalException(), and use it where sensible.
TEST=util_test ExcVariantsTest.ExcCrashRecoverOriginalException …
R=rsesek@chromium.org
Review URL: https://codereview.chromium.org/566693003
2014-09-17 17:59:35 -04:00
Mark Mentovai
8c8089dc77
Add ExceptionPorts and its test.
...
This is a unified interface to
{thread,task,host}_{get,set}_exception_ports().
TEST=util_test ExceptionPorts.*
R=rsesek@chromium.org
Review URL: https://codereview.chromium.org/549023005
2014-09-16 17:36:33 -04:00