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
#include <iostream> | |
#include <atomic> | |
#include <thread> | |
#include <mutex> | |
#include <chrono> | |
#include <vector> | |
#include <functional> | |
using namespace std; | |
static const uint64_t MARK_BIT = 0xaa000000000000; |
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
#include <iostream> | |
#include <atomic> | |
#include <thread> | |
#include <mutex> | |
#include <chrono> | |
#include <vector> | |
#include <functional> | |
using namespace std; | |
static const uint64_t MARK_BIT = 0xaa000000000000; |
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
#include <iostream> | |
#include <atomic> | |
#include <thread> | |
#include <functional> | |
using namespace std; | |
static const uint64_t MARK_BIT = 0xaa000000000000; | |
static const uint64_t MASK = 0x00FFFFFFFFFFFF; | |
static const int TIMES = 1000; |
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
#include <iostream> | |
#include <atomic> | |
#include <vector> | |
#include <threads.h> | |
#include <cstring> | |
using namespace std; | |
class Variable | |
{ |
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
execve("/bin/sleep", ["sleep", "87"], 0x7fffe1020c08 /* 19 vars */) = 0 | |
brk(NULL) = 0x7fffe1c64000 | |
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory) | |
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory) | |
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3 | |
fstat(3, {st_mode=S_IFREG|0644, st_size=27024, ...}) = 0 | |
mmap(NULL, 27024, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f76709c8000 | |
close(3) = 0 | |
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory) | |
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3 |
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
#include <iostream> | |
#include <atomic> | |
#include <vector> | |
#include <threads.h> | |
using namespace std; | |
class StaticTreeBarrier; | |
class Node; |
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
#include "barrier.h" | |
StaticTreeBarrier stb(3,2); | |
int testCase(void* i) | |
{ | |
// some test case | |
int index = *(int*)i; |
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
#include <iostream> | |
#include <atomic> | |
#include <vector> | |
#include <threads.h> | |
using namespace std; | |
class StaticTreeBarrier; | |
class Node; | |
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
#include <iostream> | |
#include <atomic> | |
#include <vector> | |
using namespace std; | |
class StaticTreeBarrier; | |
class Node; | |
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
# Repo: https://github.com/andyfleming/oh-my-zsh | |
# Direct Link: https://github.com/andyfleming/oh-my-zsh/blob/master/themes/af-magic.zsh-theme | |
if [ $UID -eq 0 ]; then NCOLOR="red"; else NCOLOR="green"; fi | |
local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})" | |
#%{$fg[blue]%}%D{[%X]} \ | |
# primary prompt | |
PROMPT='%{$FG[084]%}%n@%m: \ |
NewerOlder