Last renamings in the Atomics/wake folder

This commit is contained in:
Leo Balter 2018-06-28 16:20:22 -04:00 committed by Rick Waldron
parent 6533378823
commit 4911c6e77a
14 changed files with 47 additions and 47 deletions

View File

@ -4,8 +4,8 @@
/*---
esid: sec-atomics.notify
description: >
Test that Atomics.notify wakes all waiters on a location, but does not
wake waiters on other locations.
Test that Atomics.notify notifies all waiters on a location, but does not
notify waiters on other locations.
includes: [atomicsHelper.js]
features: [Atomics, BigInt, SharedArrayBuffer, TypedArray]
---*/
@ -63,10 +63,10 @@ $262.agent.broadcast(i64a.buffer);
$262.agent.waitUntil(i64a, RUNNING, BigInt(NUMAGENT + 1));
// Try to yield control to ensure the agent actually started to wait. If we
// don't, we risk sending the wakeup before agents are sleeping, and we hang.
// don't, we risk sending the notification before agents are sleeping, and we hang.
$262.agent.tryYield();
// Wake all waiting on WAIT_INDEX, should be 3 always, they won't time out.
// Notify all waiting on WAIT_INDEX, should be 3 always, they won't time out.
assert.sameValue(
Atomics.notify(i64a, WAIT_INDEX),
NUMAGENT,

View File

@ -8,7 +8,7 @@ includes: [propertyHelper.js]
features: [Atomics]
---*/
verifyProperty(Atomics, 'wake', {
verifyProperty(Atomics, 'notify', {
enumerable: false,
writable: true,
configurable: true,

View File

@ -5,13 +5,13 @@
/*---
esid: sec-atomics.notify
description: >
Atomics.notify.name is "wake".
Atomics.notify.name is "notify".
includes: [propertyHelper.js]
features: [Atomics]
---*/
verifyProperty(Atomics.notify, 'name', {
value: 'wake',
value: 'notify',
enumerable: false,
writable: false,
configurable: true,

View File

@ -4,7 +4,7 @@
/*---
esid: sec-atomics.notify
description: >
Test that Atomics.notify wakes zero waiters if the count is negative
Test that Atomics.notify notifies zero waiters if the count is negative
includes: [atomicsHelper.js]
features: [Atomics, SharedArrayBuffer, TypedArray]
---*/

View File

@ -4,8 +4,8 @@
/*---
esid: sec-atomics.notify
description: >
Test that Atomics.notify wakes all waiters on a location, but does not
wake waiters on other locations.
Test that Atomics.notify notifies all waiters on a location, but does not
notify waiters on other locations.
includes: [atomicsHelper.js]
features: [Atomics, SharedArrayBuffer, TypedArray]
---*/
@ -63,10 +63,10 @@ $262.agent.broadcast(i32a.buffer);
$262.agent.waitUntil(i32a, RUNNING, NUMAGENT + 1);
// Try to yield control to ensure the agent actually started to wait. If we
// don't, we risk sending the wakeup before agents are sleeping, and we hang.
// don't, we risk sending the notification before agents are sleeping, and we hang.
$262.agent.tryYield();
// Wake all waiting on WAIT_INDEX, should be 3 always, they won't time out.
// Notify all waiting on WAIT_INDEX, should be 3 always, they won't time out.
assert.sameValue(
Atomics.notify(i32a, WAIT_INDEX),
NUMAGENT,

View File

@ -4,7 +4,7 @@
/*---
esid: sec-atomics.notify
description: >
Test that Atomics.notify wakes all waiters if that's what the count is.
Test that Atomics.notify notifies all waiters if that's what the count is.
includes: [atomicsHelper.js]
features: [Atomics, SharedArrayBuffer, TypedArray]
---*/
@ -36,10 +36,10 @@ $262.agent.broadcast(i32a.buffer);
$262.agent.waitUntil(i32a, RUNNING, NUMAGENT);
// Try to yield control to ensure the agent actually started to wait. If we
// don't, we risk sending the wakeup before agents are sleeping, and we hang.
// don't, we risk sending the notification before agents are sleeping, and we hang.
$262.agent.tryYield();
// Wake all waiting on WAIT_INDEX, should be 3 always, they won't time out.
// Notify all waiting on WAIT_INDEX, should be 3 always, they won't time out.
assert.sameValue(
Atomics.notify(i32a, WAIT_INDEX),
NUMAGENT,

View File

@ -4,7 +4,7 @@
/*---
esid: sec-atomics.notify
description: >
Test that Atomics.notify wakes agents in the order they are waiting.
Test that Atomics.notify notifies agents in the order they are waiting.
includes: [atomicsHelper.js]
features: [Atomics, SharedArrayBuffer, TypedArray]
---*/
@ -16,8 +16,8 @@ const RUNNING = SPIN + NUMAGENT; // Accounting of live agents
const BUFFER_SIZE = RUNNING + 1;
// Create workers and start them all spinning. We set atomic slots to make
// them go into a wait, thus controlling the waiting order. Then we wake them
// one by one and observe the wakeup order.
// them go into a wait, thus controlling the waiting order. Then we notify them
// one by one and observe the notification order.
for (var i = 0; i < NUMAGENT; i++) {
$262.agent.start(`

View File

@ -4,7 +4,7 @@
/*---
esid: sec-atomics.notify
description: >
Test that Atomics.notify wakes agents in the order they are waiting.
Test that Atomics.notify notifies agents in the order they are waiting.
includes: [atomicsHelper.js]
features: [Atomics, SharedArrayBuffer, TypedArray]
---*/
@ -16,8 +16,8 @@ const RUNNING = SPIN + NUMAGENT; // Accounting of live agents
const BUFFER_SIZE = RUNNING + 1;
// Create workers and start them all spinning. We set atomic slots to make
// them go into a wait, thus controlling the waiting order. Then we wake them
// one by one and observe the wakeup order.
// them go into a wait, thus controlling the waiting order. Then we notify them
// one by one and observe the notification order.
for (var i = 0; i < NUMAGENT; i++) {
$262.agent.start(`

View File

@ -4,14 +4,14 @@
/*---
esid: sec-atomics.notify
description: >
Test that Atomics.notify wakes one waiter if that's what the count is.
Test that Atomics.notify notifies one waiter if that's what the count is.
includes: [atomicsHelper.js]
features: [Atomics, SharedArrayBuffer, TypedArray]
---*/
const WAIT_INDEX = 0; // Agents wait here
const RUNNING = 1; // Accounting of live agents here
const WAKECOUNT = 1;
const NOTIFYCOUNT = 1;
const NUMAGENT = 3;
const BUFFER_SIZE = 4;
@ -42,13 +42,13 @@ $262.agent.waitUntil(i32a, RUNNING, NUMAGENT);
// Try to yield control to ensure the agent actually started to wait.
$262.agent.tryYield();
// There's a slight risk we'll fail to wake the desired count, if the preceding
// There's a slight risk we'll fail to notify the desired count, if the preceding
// tryYield() took much longer than anticipated and workers have started timing
// out.
assert.sameValue(
Atomics.notify(i32a, 0, WAKECOUNT),
WAKECOUNT,
'Atomics.notify(i32a, 0, WAKECOUNT) returns the value of `WAKECOUNT`'
Atomics.notify(i32a, 0, NOTIFYCOUNT),
NOTIFYCOUNT,
'Atomics.notify(i32a, 0, NOTIFYCOUNT) returns the value of `NOTIFYCOUNT`'
);
// Try to sleep past the timeout.
@ -61,9 +61,9 @@ for (var i = 0; i < NUMAGENT; i++) {
}
reports.sort();
for (var i = 0; i < WAKECOUNT; i++) {
for (var i = 0; i < NOTIFYCOUNT; i++) {
assert.sameValue(reports[i], 'ok', 'The value of reports[i] is "ok"');
}
for (var i = WAKECOUNT; i < NUMAGENT; i++) {
for (var i = NOTIFYCOUNT; i < NUMAGENT; i++) {
assert.sameValue(reports[i], 'timed-out', 'The value of reports[i] is "timed-out"');
}

View File

@ -4,14 +4,14 @@
/*---
esid: sec-atomics.notify
description: >
Test that Atomics.notify wakes two waiters if that's what the count is.
Test that Atomics.notify notifies two waiters if that's what the count is.
includes: [atomicsHelper.js]
features: [Atomics, SharedArrayBuffer, TypedArray]
---*/
const WAIT_INDEX = 0; // Agents wait here
const RUNNING = 1; // Accounting of live agents here
const WAKECOUNT = 2;
const NOTIFYCOUNT = 2;
const NUMAGENT = 3;
const BUFFER_SIZE = 4;
@ -42,13 +42,13 @@ $262.agent.waitUntil(i32a, RUNNING, NUMAGENT);
// Try to yield control to ensure the agent actually started to wait.
$262.agent.tryYield();
// There's a slight risk we'll fail to wake the desired count, if the preceding
// There's a slight risk we'll fail to notify the desired count, if the preceding
// tryYield() took much longer than anticipated and workers have started timing
// out.
assert.sameValue(
Atomics.notify(i32a, 0, WAKECOUNT),
WAKECOUNT,
'Atomics.notify(i32a, 0, WAKECOUNT) returns the value of `WAKECOUNT`'
Atomics.notify(i32a, 0, NOTIFYCOUNT),
NOTIFYCOUNT,
'Atomics.notify(i32a, 0, NOTIFYCOUNT) returns the value of `NOTIFYCOUNT`'
);
// Try to sleep past the timeout.
@ -61,9 +61,9 @@ for (var i = 0; i < NUMAGENT; i++) {
}
reports.sort();
for (var i = 0; i < WAKECOUNT; i++) {
for (var i = 0; i < NOTIFYCOUNT; i++) {
assert.sameValue(reports[i], 'ok', 'The value of reports[i] is "ok"');
}
for (var i = WAKECOUNT; i < NUMAGENT; i++) {
for (var i = NOTIFYCOUNT; i < NUMAGENT; i++) {
assert.sameValue(reports[i], 'timed-out', 'The value of reports[i] is "timed-out"');
}

View File

@ -4,7 +4,7 @@
/*---
esid: sec-atomics.notify
description: >
Test that Atomics.notify wakes zero waiters if there are no agents waiting.
Test that Atomics.notify notifies zero waiters if there are no agents waiting.
includes: [atomicsHelper.js]
features: [Atomics, SharedArrayBuffer, TypedArray]
---*/
@ -27,5 +27,5 @@ const i32a = new Int32Array(
$262.agent.broadcast(i32a.buffer);
$262.agent.waitUntil(i32a, RUNNING, 1);
// There are ZERO agents waiting to wake...
// There are ZERO agents waiting to notify...
assert.sameValue(Atomics.notify(i32a, 0, 1), 0, 'Atomics.notify(i32a, 0, 1) returns 0');

View File

@ -4,7 +4,7 @@
/*---
esid: sec-atomics.notify
description: >
Test that Atomics.notify wakes zero waiters if there are no waiters
Test that Atomics.notify notifies zero waiters if there are no waiters
at the index specified.
includes: [atomicsHelper.js]
features: [Atomics, SharedArrayBuffer, TypedArray]

View File

@ -4,14 +4,14 @@
/*---
esid: sec-atomics.notify
description: >
Test that Atomics.notify wakes zero waiters if that's what the count is.
Test that Atomics.notify notifies zero waiters if that's what the count is.
includes: [atomicsHelper.js]
features: [Atomics, SharedArrayBuffer, TypedArray]
---*/
const WAIT_INDEX = 0; // Agents wait here
const RUNNING = 1; // Accounting of live agents here
const WAKECOUNT = 0;
const NOTIFYCOUNT = 0;
const NUMAGENT = 3;
const BUFFER_SIZE = 4;
@ -43,9 +43,9 @@ $262.agent.waitUntil(i32a, RUNNING, NUMAGENT);
$262.agent.tryYield();
assert.sameValue(
Atomics.notify(i32a, WAIT_INDEX, WAKECOUNT),
WAKECOUNT,
'Atomics.notify(i32a, WAIT_INDEX, WAKECOUNT) returns the value of `WAKECOUNT`'
Atomics.notify(i32a, WAIT_INDEX, NOTIFYCOUNT),
NOTIFYCOUNT,
'Atomics.notify(i32a, WAIT_INDEX, NOTIFYCOUNT) returns the value of `NOTIFYCOUNT`'
);
// Try to sleep past the timeout.

View File

@ -58,14 +58,14 @@ $262.agent.waitUntil(i32a, RUNNING, NUMAGENT);
// Try to yield control to ensure the agents actually started to wait.
$262.agent.tryYield();
// Wake at index 0, undefined => 0.
// Notify at index 0, undefined => 0.
var woken = 0;
while ((woken = Atomics.notify(i32a, undefined, 1)) === 0) ;
assert.sameValue(woken, 1, 'Atomics.notify(i32a, undefined, 1) returns 1');
assert.sameValue($262.agent.getReport(), 'ok', '$262.agent.getReport() returns "ok"');
// Wake again at index 0, default => 0.
// Notify again at index 0, default => 0.
var woken = 0;
while ((woken = Atomics.notify(i32a, /*, default values used */)) === 0) ;
assert.sameValue(woken, 1, 'Atomics.notify(i32a /*, default values used */) returns 1');