Created
February 27, 2016 01:51
-
-
Save Araq/5c1db2d505a9094e185d to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| const CacheLineSize = 32 # true for most archs | |
| type | |
| Barrier = object | |
| entered: int | |
| cv: Semaphore # Semaphore takes 3 words at least | |
| when sizeof(int) < 8: | |
| cacheAlign: array[CacheLineSize-4*sizeof(int), byte] | |
| left: int | |
| cacheAlign2: array[CacheLineSize-sizeof(int), byte] | |
| interest: bool ## wether the master is interested in the "all done" event |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment