General cleanup (#525)

* Cleans up and trims the overly large builtins file by ~1600 lines
* Properly propagate inline assembler-like argument types
* Use https in examples
* Reformat README
This commit is contained in:
Daniel Wirtz
2019-03-08 14:24:48 +01:00
committed by GitHub
parent 5f547131ab
commit 252b843c4b
15 changed files with 2516 additions and 4170 deletions

View File

@ -57,7 +57,7 @@ export namespace atomic {
@builtin export declare function xchg<T>(ptr: usize, value: T, immOffset?: usize): T;
@builtin export declare function cmpxchg<T>(ptr: usize, expected: T, replacement: T, immOffset?: usize): T;
@builtin export declare function wait<T>(ptr: usize, expected: T, timeout: i64): AtomicWaitResult;
@builtin export declare function notify<T>(ptr: usize, count: u32): u32;
@builtin export declare function notify<T>(ptr: usize, count: i32): i32;
}
@lazy export const enum AtomicWaitResult {

View File

@ -186,7 +186,7 @@ declare namespace atomic {
/** Performs a wait operation on an integer value in memory suspending this agent if the condition is met. */
export function wait<T>(ptr: usize, expected: T, timeout: i64): AtomicWaitResult;
/** Performs a notify operation on an integer value in memory waking up suspended agents. */
export function notify<T>(ptr: usize, count: u32): i32;
export function notify<T>(ptr: usize, count: i32): i32;
}
/** Describes the result of an atomic wait operation. */