This repository has been archived by the owner on Jun 21, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 68
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #262 from anmolsahoo25/inline-loads-specialized
Inline loads specialized
- Loading branch information
Showing
3 changed files
with
12 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
type 'a t | ||
|
||
val make : 'a -> 'a t | ||
val get : 'a t -> 'a | ||
external make : 'a -> 'a t = "%makemutable" | ||
external get : 'a t -> 'a = "%atomic_load" | ||
external exchange : 'a t -> 'a -> 'a = "%atomic_exchange" | ||
external compare_and_set : 'a t -> 'a -> 'a -> bool = "%atomic_cas" | ||
external fetch_and_add : int t -> int -> int = "%atomic_fetch_add" | ||
|
||
val set : 'a t -> 'a -> unit | ||
val exchange : 'a t -> 'a -> 'a | ||
val compare_and_set : 'a t -> 'a -> 'a -> bool | ||
val fetch_and_add : int t -> int -> int | ||
val incr : int t -> unit | ||
val decr : int t -> unit |