Commit eddc52e3 authored by DEPRECATED (Jonathan Mace) (Use @JonathanMace instead)'s avatar DEPRECATED (Jonathan Mace) (Use @JonathanMace instead)
Browse files

Capitalize operation logging

parent 917ceef5
......@@ -9,41 +9,41 @@ Baggage& ThreadLocalBaggage::Get() {
}
Baggage ThreadLocalBaggage::Take() {
XTRACE("ThreadLocalBaggage::Take", {{"operation", "unset"}});
XTRACE("ThreadLocalBaggage::Take", {{"Operation", "unset"}});
Baggage b = current_threads_baggage;
current_threads_baggage = Baggage();
return b;
}
Baggage ThreadLocalBaggage::Branch() {
XTRACE("ThreadLocalBaggage::Branch", {{"operation", "fork"}});
XTRACE("ThreadLocalBaggage::Branch", {{"Operation", "fork"}});
return current_threads_baggage;
}
void ThreadLocalBaggage::Join(Baggage &otherBaggage) {
current_threads_baggage = Baggage::merge(current_threads_baggage, otherBaggage);
XTRACE("ThreadLocalBaggage::Join", {{"operation", "fork"}});
XTRACE("ThreadLocalBaggage::Join", {{"Operation", "fork"}});
}
void ThreadLocalBaggage::Set(Baggage new_baggage) {
if (current_threads_baggage.atoms.size() == 0) {
current_threads_baggage = new_baggage;
XTRACE("ThreadLocalBaggage::Set", {{"operation", "set"}});
XTRACE("ThreadLocalBaggage::Set", {{"Operation", "set"}});
} else {
current_threads_baggage = new_baggage;
}
}
Baggage ThreadLocalBaggage::Swap(Baggage other_baggage) {
XTRACE("ThreadLocalBaggage::Swap", {{"operation", "unset"}});
XTRACE("ThreadLocalBaggage::Swap", {{"Operation", "unset"}});
Baggage prev = current_threads_baggage;
current_threads_baggage = other_baggage;
XTRACE("ThreadLocalBaggage::Swap", {{"operation", "set"}});
XTRACE("ThreadLocalBaggage::Swap", {{"Operation", "set"}});
return prev;
}
void ThreadLocalBaggage::Delete() {
XTRACE("ThreadLocalBaggage::Delete", {{"operation", "unset"}});
XTRACE("ThreadLocalBaggage::Delete", {{"Operation", "unset"}});
current_threads_baggage = Baggage();
}
......@@ -52,40 +52,40 @@ Baggage& ThreadLocalBaggage::Get(const char* file, int line) {
}
Baggage ThreadLocalBaggage::Take(const char* file, int line) {
XTRACE2(file, line, "ThreadLocalBaggage::Take", {{"operation", "unset"}});
XTRACE2(file, line, "ThreadLocalBaggage::Take", {{"Operation", "unset"}});
Baggage b = current_threads_baggage;
current_threads_baggage = Baggage();
return b;
}
Baggage ThreadLocalBaggage::Branch(const char* file, int line) {
XTRACE2(file, line, "ThreadLocalBaggage::Branch", {{"operation", "fork"}});
XTRACE2(file, line, "ThreadLocalBaggage::Branch", {{"Operation", "fork"}});
return current_threads_baggage;
}
void ThreadLocalBaggage::Join(Baggage &otherBaggage, const char* file, int line) {
current_threads_baggage = Baggage::merge(current_threads_baggage, otherBaggage);
XTRACE2(file, line, "ThreadLocalBaggage::Join", {{"operation", "fork"}});
XTRACE2(file, line, "ThreadLocalBaggage::Join", {{"Operation", "fork"}});
}
void ThreadLocalBaggage::Set(Baggage new_baggage, const char* file, int line) {
if (current_threads_baggage.atoms.size() == 0) {
current_threads_baggage = new_baggage;
XTRACE2(file, line, "ThreadLocalBaggage::Set", {{"operation", "set"}});
XTRACE2(file, line, "ThreadLocalBaggage::Set", {{"Operation", "set"}});
} else {
current_threads_baggage = new_baggage;
}
}
Baggage ThreadLocalBaggage::Swap(Baggage other_baggage, const char* file, int line) {
XTRACE2(file, line, "ThreadLocalBaggage::Swap", {{"operation", "unset"}});
XTRACE2(file, line, "ThreadLocalBaggage::Swap", {{"Operation", "unset"}});
Baggage prev = current_threads_baggage;
current_threads_baggage = other_baggage;
XTRACE2(file, line, "ThreadLocalBaggage::Swap", {{"operation", "set"}});
XTRACE2(file, line, "ThreadLocalBaggage::Swap", {{"Operation", "set"}});
return prev;
}
void ThreadLocalBaggage::Delete(const char* file, int line) {
XTRACE2(file, line, "ThreadLocalBaggage::Delete", {{"operation", "unset"}});
XTRACE2(file, line, "ThreadLocalBaggage::Delete", {{"Operation", "unset"}});
current_threads_baggage = Baggage();
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment