History log of /fuchsia/zircon/system/utest/events/events.c
Revision Date Author Comments
# 089f5367 03-Oct-2017 George Kulakowski <kulakowski@google.com>

[signals] Remove ZX_SIGNAL_LAST_HANDLE

Change-Id: I2ad0c145ea2c22ce022f9ab443fed24a3e3c7f65


# f3e2126c 12-Sep-2017 Roland McGrath <mcgrathr@google.com>

[zx] Magenta -> Zircon

The Great Renaming is here!

Change-Id: I3229bdeb2a3d0e40fb4db6fec8ca7d971fbffb94


# 9c455646 16-Jun-2017 George Kulakowski <kulakowski@google.com>

[utest][status] Use the MX_OK and MX_ERR_* mx_status_t names

Change-Id: Ia395c985d6d13cdad97e66d92933d13ddb75c8b8


# d828ac33 09-May-2017 Carlos Pizano <cpu@google.com>

[kernel][magenta] last handle signal

Introduces a new signal MX_SIGNAL_LAST_HANDLE which
is on by default on new created objects.

Moves all the heavy logic of 0 handle, one handle
and so on to magenta.cpp which is already taking
the very convenient lock. This also removes
the atomic operations on the handle count, however
in order to properly synchronize the handle
count and the signals, a fairly ugly
double check is introduced in the state_tracker
via StateTracker::UpdateLastHandleSignal()

- Adds a new .md that better explains generic signals
- Adds new tests for the corner cases.

The rest of the code is fixing the many tests
that compare signals with a particular value which
need to be updated for the new signal that
shows up unless the handle is duplicated.

Change-Id: Id42b3fe951c16407bc08e18bb342ddd8f2830bf9


# bbcb4c62 03-Apr-2017 Todd Eisenberger <teisenbe@google.com>

[time] Switch callers of syscalls with timeouts to use conversion function

This is in preparation for moving syscalls to absolute deadlines rather
than relative timeouts.

Change-Id: Ic85abbf76f34fbce7899c2505be840e3d3dcf7ff


# 47677741 01-Mar-2017 Carlos Pizano <cpu@google.com>

[kernel][magenta] Cancelation

new syscall: mx_object_wait_cancel()

Allows you to cancel both object_wait_ and object_async_wait
syscalls. The existing pattern of closing the waited on handle
is preserved but the error status that both cases returns is
changed from

ERR_HANDLE_CLOSED
to
ERR_OPERATION_CANCELED

The previous status is kept but deprecated. In a followup
CL the rest of the magenta callers will be converted and
in a further CL the fuchsia callers will be converted.

Change-Id: I0fbbe664e4ef9d798d2068230d40fb6a36750d02


# e55b92da 10-Feb-2017 Brian Swetland <swetland@google.com>

[syscalls] update callers to mx_handle_wait_*() and deprecate

Change-Id: I7b0516007b99d58aee906eac62358625100ee32e


# b50b93c3 03-Jan-2017 George Kulakowski <kulakowski@google.com>

[signals] Remove legacy signal names

Change-Id: I6d4543358a16d16b9b9028ede06af40a632ba31b


# 6f797a78 06-Jan-2017 Brian Swetland <swetland@google.com>

[syscalls] adjust behaviour of mx_handle_wait_*() and update docs.

With this change, the behaviour of these calls where timeout==0 changes.

Previously timeout==0 would always result in ERR_TIMED_OUT, regardless
of the state of the objects being waited upon. Now, NO_ERROR will be
returned if any of the awaited signals were observed.

Updated man pages to better reflect the behaviour of these calls, including
this change.

Change-Id: I205e9dd963049a094f8ec7c7bbf91ccd01919c11


# 90c44683 01-Nov-2016 Brian Swetland <swetland@google.com>

[kernel][signals] eliminate ERR_BAD_STATE from wait_one/wait_many

- ERR_BAD_HANDLE returned if provided handle(s) are invalid
- ERR_HANDLE_CLOSED returned if handle(s) are closed while waiting
- ERR_TIMED_OUT returned if timeout is 0 or timeout expires while
waiting (observed bits are set in both cases)
- NO_ERROR returned if signal observed before timeout expires

Change-Id: Id4ee74537b644d2b36f42bff0e0bbd41ddbb6588


# 51c44ea6 31-Oct-2016 Brian Swetland <swetland@google.com>

[syscalls] update mx_handle_wait_many()

Change-Id: I6b45113cd53d7472823aabe4131f7ef8fa008792


# 8a41d716 27-Oct-2016 Carlos Pizano <cpu@google.com>

[magenta] Implement new signal scheme (part 1)

The new scheme is as follows
-24 per-object signals
-8 user-settable signals
-macros map the 24 into pleasant names

for example

currently: signal_signaled for a thread it means the thread exited or
for an event when the event is signaled

in the new scheme task_terminated is the signal name for the thread
and an event is event_signaled, it is an impl detail if the
bit positions are the same or not.

Change-Id: Iaaaff5d64ed33ec456a305972bc2bf6df4ae5695


# 796bfaf8 31-Oct-2016 Brian Swetland <swetland@google.com>

[syscalls] update mx_handle_wait_one()

Change-Id: I03c03b0c02041e680e44930e4d8c22f380d26916


# 469bd241 27-Oct-2016 Brian Swetland <swetland@google.com>

[syscalls] update event_create()

Change-Id: Ib736156e938357066505865379a4438ab4768aec


# 20cd8041 09-Sep-2016 Yvonne Yip <yky@google.com>

sync errors.md with fuchsia-types.def

ERR_NOT_ENOUGH_BUFFER -> ERR_BUFFER_TOO_SMALL
ERR_FLOW_CONTROL -> ERR_SHOULD_WAIT
ERR_NOT_READY -> ERR_UNAVAILABLE
ERR_NOT_AVAILABLE -> ERR_ALREADY_BOUND
ERR_I2C_NACK -> ERR_IO_REFUSED
ERR_CHECKSUM_FAIL -> ERR_IO_DATA_INTEGRITY

Add ERR_IO_DATA_LOSS
Remove ERR_CANCELLED

Change-Id: Ibe27bc5198cc4d83ed384bf2858cfca0a8694d4c


# 43a5cd1d 26-Aug-2016 Todd Eisenberger <teisenbe@google.com>

[time] Update some code to use new time convenience macros

Change-Id: I6289116690e46948c0f2d39e68939331173335d7


# bf482e62 15-Aug-2016 George Kulakowski <kulakowski@google.com>

[musl][runtime][threads] Move mxr_thread_t callers to C11 threads

Change-Id: Ia8c932f622ae8314f9459246cbba5c64f94da8f5


# 281dde3d 22-Aug-2016 Viet-Trung Luu <vtl@google.com>

[magenta][syscalls] Change the order of mx_object_signal()'s set_mask and clear_mask args, etc.

(Also change Dispatcher::UserSignal() and a couple of StateTracker
methods.)

This is to make it more clear that signals are cleared before they are
set (and the two may overlap).

Change-Id: Ibf8ff73a0e2640544c31308796c3c1d2176511f0


# 74df78fe 18-Aug-2016 Viet-Trung Luu <vtl@google.com>

[magenta][syscalls] Get rid of mx_event_{signal,reset}().

Instead, just use mx_object_signal().

Also, replace MX_SIGNAL_USER[0-3] with MX_SIGNAL_SIGNAL[0-4], with
MX_SIGNAL_SIGNALED an alias for MX_SIGNAL_SIGNAL0.

Change-Id: Ib1a8b10e1b7416165d163ab636e6dca5649ff136


# 66a201f1 16-Aug-2016 Brian Swetland <swetland@frotz.net>

[system] align license and license banners with Fuchsia

This adjusts the Magenta userspace code to match the prevailing
license in Fuchsia (three-clause BSD), using the same banner
and license text.

Change-Id: I6b6d79435c5dbaa32027888874849e4f47aaa7be


# 722d33c1 08-Aug-2016 Brian Swetland <swetland@google.com>

[magenta][syscalls] normalize handle related errors

Per the error unification and rationalization discussion(s) and
as documented in docs/errors.md:

ERR_WRONG_TYPE:
The subject of the operation is the wrong type to perform the operation.
Example: Attempting a message_read on a thread handle.

ERR_BAD_HANDLE:
A specified handle value does not refer to a handle.

This change updates all the magenta syscalls to return the above errors
under the conditions matching their descriptions above.

We disable the global application of crash-on-bad-handles policy for now
as a bunch of userspace code was passing bad handles but not being flagged
because we were treating them as invalid arguments.

Change-Id: I6a34d22d295da8fad744f756cab7417e39a4c901


# e669ece6 29-Jul-2016 James Robinson <jamesr@google.com>

[magenta] wait_many on zero handles should timeout

It's much more convenient for wait_many on no handles to sleep and
return a timeout instead of complaining about invalid arguments. This
should probably be transformed in userspace before the syscall
dispatch in a vdso or similar, but this gets the desired semantics for
now.

Change-Id: I8c1728d9ee8a00bede4ecec8b5c12adf536bea0f


# 09fcbec0 21-Jul-2016 Viet-Trung Luu <vtl@google.com>

Fix wait_many, and make it unwind properly.

BUG=MG-203

Change-Id: I34c4c1018dea8eab2a5218603358c1b3625b7157


# feb15c6f 14-Jul-2016 Viet-Trung Luu <vtl@google.com>

[magenta][syscalls] Refactor wait-one/wait-many to use a WaitEvent object.

Also make wait-one/wait-many provide the satisfied/satisfiable signals
in a struct (mx_signals_state_t), and add a result_index output argument
to wait-many.

Currently, the WaitEvent object still uses an event_t, but that can be
changed later.

The WaitEvent can pass a context, which is used to transmit the
result_index for wait-many (i.e., the index of the first handle to
cause the wait to be satisfied).

Some of the abstraction (like WaitEvent::Result) is to support future
work on wait sets, etc. (The context also is a uint64_t, to support work
on wait sets.)

Change-Id: I54c517b8627d225da72a23ff5a72be9b3a92065b


# 069fda18 13-Jul-2016 Carlos Pizano <cpu@google.com>

[system][utest]/[mxsh] Make runtests output less by default

To output the full amount use "runtests -v".

This introduces a verbosity_level concept for system/ulib/unnittest
with unittest_set_verbosity_level(level) to control it.

Change-Id: I0f301adf4fdac9a3cf6c76e41d4b9587c9495d1f


# 937bde71 11-Jul-2016 Brian Swetland <swetland@google.com>

[syscalls][api] rename _magenta_*() to mx_*()

The _magenta_ prefix is pretty unwieldy.
This change simplifies that a bit.

This was done mechanically, and boots, runs, and passes tests
on qemu arm64, amd64, and NUC.

Change-Id: I8eb07db6ed6f4b8cac96344cc4ad65ce3f85f917


# 9f79ef6c 07-Jul-2016 Travis Geiselbrecht <travisg@google.com>

[system][threads] switch most users of _magenta_thread_create to mxr_ equivalent

This will make it somewhat easier to work with the underlying syscalls.

Change-Id: I39522f4a84d9841b654682a11c1eaa391cf12aa0


# 26cb269f 06-Jul-2016 George Kulakowski <kulakowski@google.com>

[ulib][unittest] Move unittest into its own library

Change-Id: I1586278e3bbb6ceacd26a1342985922dc8861cf7


# ff86a242 21-Jun-2016 George Kulakowski <kulakowski@google.com>

[build][userspace] Support .init_array for userspace with gcc

In particular, with this change, C++ constructors are running now, and
static C variables are initialized.

Change-Id: If0252773faae705af78902f782aaa200d0c5f85e


# 576ea4e7 06-Jul-2016 Travis Geiselbrecht <travisg@google.com>

[tests] bump the timeout of a few tests out to make sure they work on slow emulators with a lot of spew

Change-Id: Ie2f9b6c2949709ba57c34abad6b9ab8dac281f82


# 3e80ea86 30-Jun-2016 Ankur Mittal <anmittal@google.com>

[utest] Port event test to use test framework

Change-Id: I77762694e780288c81fddcce4e3dd0a2b60f4ef2


# be256222 22-Jun-2016 Carlos Pizano <cpu@google.com>

[kernel][magenta] Fix reset event bug

The _magenta_event_reset() codepath used the old scheme
which did not clean up before.

Change-Id: I124a7961f7ca7212262f4c06f2510155fde35702


# 4ebbc5b1 15-Jun-2016 Brian Swetland <swetland@google.com>

[system] clang-format all of userspace

Change-Id: I6bb6a9187a4af83ca5c0656f05d89aa3a09fa5fa


# 53b9e1c8 15-Jun-2016 The Fuchsia Authors <authors@fuchsia.local>

[magenta] Initial commit