blob: 94e0c0f64ff0b1697752b97b9067bee41aa22ab0 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
#include "what_thread_does.h"
#include "thread_extra.h"
#include <util/system/tls.h>
Y_POD_STATIC_THREAD(const char*)
WhatThreadDoes;
const char* PushWhatThreadDoes(const char* what) {
const char* r = NTSAN::RelaxedLoad(&WhatThreadDoes);
NTSAN::RelaxedStore(&WhatThreadDoes, what);
return r;
}
void PopWhatThreadDoes(const char* prev) {
NTSAN::RelaxedStore(&WhatThreadDoes, prev);
}
const char** WhatThreadDoesLocation() {
return &WhatThreadDoes;
}
|